\input{preamble}

% OK, start here.
%
\begin{document}

\title{The Trace Formula}


\maketitle

\phantomsection
\label{section-phantom}

\tableofcontents


\section{Introduction}
\label{section-introduction}

\noindent
These are the notes of the second part of a course on \'etale cohomology
taught by Johan de Jong at Columbia University in the Fall of 2009. The
original note takers were Thibaut Pugin, Zachary Maddock and Min Lee.
Over time we will add references to background material in the rest of the
Stacks project and provide rigorous proofs of all the statements.









\section{The trace formula}
\label{section-trace-formula}

\noindent
A typical course in \'etale cohomology would normally state and prove the
proper and smooth base change theorems, purity and Poincar\'e duality. All of
these can be found in \cite[Arcata]{SGA4.5}. Instead, we are going to study the
trace formula for the frobenius, following the account of Deligne in
\cite[Rapport]{SGA4.5}. We will only look at dimension 1, but using proper base
change this is enough for the general case. Since all the cohomology groups
considered will be \'etale, we drop the subscript $_\etale$. Let us
now describe
the formula we are after. Let $X$ be a finite type scheme of dimension 1 over a
finite field $k$, $\ell$ a prime number and $\mathcal{F}$ a constructible, flat
$\mathbf{Z}/\ell^n\mathbf{Z}$ sheaf. Then
\begin{equation}
\label{equation-trace-formula-initial}
\sum\nolimits_{x \in X(k)}
\text{Tr}(\text{Frob} | \mathcal{F}_{\bar x}) =
\sum\nolimits_{i = 0}^2
(-1)^i \text{Tr}(\pi_X^* | H^i_c(X \otimes_k \bar k, \mathcal{F}))
\end{equation}
as elements of $\mathbf{Z}/\ell^n\mathbf{Z}$. As we will see, this formulation
is slightly wrong as stated. Let us nevertheless describe the symbols that
occur therein.




\section{Frobenii}
\label{section-frobenii}

\noindent
In this section we will prove a ``baffling'' theorem.
A topological analogue of the baffling theorem is the following.

\begin{exercise}
\label{exercise-baffling}
Let $X$ be a topological space and $g : X \to X$ a continuous map such that
$g^{-1}(U) = U$ for all opens $U$ of $X$. Then $g$ induces the identity on
cohomology on $X$ (for any coefficients).
\end{exercise}

\noindent
We now turn to the statement for the \'etale site.

\begin{lemma}
\label{lemma-baffling}
Let $X$ be a scheme and $g : X \to X$ a morphism. Assume that for all
$\varphi : U \to X$ \'etale, there is an isomorphism
$$
\xymatrix{
U \ar[rd]_\varphi \ar[rr]^-\sim & & {U
\times_{\varphi, X, g} X} \ar[ld]^{\text{pr}_2} \\
& X
}
$$
functorial in $U$. Then $g$ induces the identity on cohomology (for any sheaf).
\end{lemma}

\begin{proof}
The proof is formal and without difficulty.
\end{proof}

\noindent
Please see Varieties, Section \ref{varieties-section-frobenius}
for a discussion of different variants of the Frobenius morphism.

\begin{theorem}[The Baffling Theorem]
\label{theorem-baffling}
Let $X$ be a scheme in characteristic $p > 0$. Then the absolute frobenius
induces (by pullback) the trivial map on cohomology, i.e., for all
integers $j\geq 0$,
$$
F_X^* : H^j (X, \underline{\mathbf{Z}/n\mathbf{Z}}) \longrightarrow H^j (X,
\underline{\mathbf{Z}/n\mathbf{Z}})
$$
is the identity.
\end{theorem}

\noindent
This theorem is purely formal. It is a good idea, however, to review how to
compute the pullback of a cohomology class. Let us simply say that in the case
where cohomology agrees with {\v C}ech cohomology, it suffices to pull back
(using the fiber products on a site) the {\v C}ech cocycles. The general case is
quite technical, see
Hypercoverings, Theorem \ref{hypercovering-theorem-cohomology-hypercoverings}.
To prove the theorem, we merely
verify that the assumption of Lemma \ref{lemma-baffling}
holds for the frobenius.

\begin{proof}[Proof of Theorem \ref{theorem-baffling}]
We need to verify the existence of a functorial isomorphism as above. For an
\'etale morphism $\varphi : U \to X$, consider the diagram
$$
\xymatrix{
U \ar@{-->}[rd] \ar@/^1pc/[rrd]^{F_U}
\ar@/_1pc/[rdd]_\varphi \\
& {U \times_{\varphi, X, F_X} X} \ar[r]_-{\text{pr}_1}
\ar[d]^{\text{pr}_2} & U \ar[d]^\varphi \\
& X \ar[r]^{F_X} & X.
}
$$
The dotted arrow is an \'etale morphism and a universal
homeomorphism, so it is an isomorphism. See
\'Etale Morphisms, Lemma \ref{etale-lemma-relative-frobenius-etale}.
\end{proof}

%10.22.09

\begin{definition}
\label{definition-geometric-frobenius}
Let $k$ be a finite field with $q = p^f$ elements. Let $X$ be a scheme
over $k$. The {\it geometric frobenius} of $X$ is the morphism
$\pi_X : X \to X$ over $\Spec(k)$ which equals $F_X^f$.
\end{definition}

\noindent
Since $\pi_X$ is a morphism over $k$, we can base change it to any scheme over
$k$. In particular we can base change it to the algebraic closure $\bar k$
and get a morphism $\pi_X : X_{\bar k} \to X_{\bar k}$. Using $\pi_X$ also
for this base change should not be
confusing as $X_{\bar k}$ does not have a geometric frobenius of its own.

\begin{lemma}
\label{lemma-sheaf-over-finite-field-has-frobenius-descent}
Let $\mathcal{F}$ be a sheaf on $X_\etale$.
Then there are canonical isomorphisms
$\pi_X^{-1} \mathcal{F} \cong \mathcal{F}$ and
$\mathcal{F} \cong {\pi_X}_*\mathcal{F}$.
\end{lemma}

\noindent
This is false for the fppf site.

\begin{proof}
Let $\varphi : U \to X$ be \'etale. Recall that
${\pi_X}_* \mathcal{F} (U) = \mathcal{F} (U \times_{\varphi, X, \pi_X} X)$.
Since $\pi_X = F_X^f$, it follows from the proof of
Theorem \ref{theorem-baffling} that there is a functorial isomorphism
$$
\xymatrix{
U \ar[rd]_{\varphi} \ar[rr]_-{\gamma_U}
& & U \times_{\varphi, X, \pi_X} X \ar[ld]^{\text{pr}_2} \\
& X
}
$$
where $\gamma_U = (\varphi, F_U^f)$. Now we define an
isomorphism
$$
\mathcal{F} (U) \longrightarrow {\pi_X}_* \mathcal{F} (U) =
\mathcal{F} (U \times_{\varphi, X, \pi_X} X)
$$
by taking the restriction map of $\mathcal{F}$ along $\gamma_U^{-1}$.
The other isomorphism is analogous.
\end{proof}

\begin{remark}
\label{remark-may-be-confusing}
It may or may not be the case that $F^f_U$ equals $\pi_U$.
\end{remark}

\noindent
We continue discussion cohomology of sheaves on our scheme $X$ over
the finite field $k$ with $q = p^f$ elements.
Fix an algebraic closure $\bar k$ of $k$ and write $G_k =
\text{Gal}(\bar k/k)$ for the absolute Galois group of $k$.
Let $\mathcal{F}$ be an abelian sheaf on $X_\etale$.
We will define a left $G_k$-module structure
cohomology group $H^j (X_{\bar k}, \mathcal{F}|_{X_{\bar k}})$
as follows: if $\sigma \in G_k$, the diagram
$$
\xymatrix{
X_{\bar k} \ar[rd] \ar[rr]^{\Spec(\sigma) \times \text{id}_X} & &
X_{\bar k} \ar[ld] \\
& X
}
$$
commutes. Thus we can set, for $\xi \in H^j (X_{\bar k}, \mathcal{F}|_{X_{\bar
k}})$
$$
\sigma \cdot \xi := (\Spec(\sigma) \times \text{id}_X)^*\xi \in
H^j(X_{\bar k}, (\Spec(\sigma) \times \text{id}_X)^{-1}
\mathcal{F}|_{X_{\bar k}})
= H^j (X_{\bar k}, \mathcal{F}|_{X_{\bar k}}),
$$
where the last equality follows from the commutativity of the previous diagram.
This endows the latter group with the structure of a $G_k$-module.

\begin{lemma}
\label{lemma-two-actions-agree}
In the situation above denote $\alpha : X \to \Spec(k)$ the structure morphism.
Consider the stalk $(R^j\alpha_*\mathcal{F})_{\Spec(\bar k)}$ endowed with its
natural Galois action as in
\'Etale Cohomology, Section \ref{etale-cohomology-section-galois-action-stalks}.
Then the identification
$$
(R^j\alpha_*\mathcal{F})_{\Spec(\bar k)} \cong H^j (X_{\bar k},
\mathcal{F}|_{X_{\bar k}})
$$
from
\'Etale Cohomology, Theorem \ref{etale-cohomology-theorem-higher-direct-images}
is an isomorphism of $G_k$-modules.
\end{lemma}

\noindent
A similar result holds comparing
$(R^j\alpha_!\mathcal{F})_{\Spec(\bar k)}$ with
$H^j_c (X_{\bar k}, \mathcal{F}|_{X_{\bar k}})$.

\begin{proof}
Omitted.
\end{proof}

\begin{definition}
\label{definition-arithmetic-frobenius}
The {\it arithmetic frobenius} is the map
$\text{frob}_k : \bar k \to \bar k$, $x \mapsto x^q$ of $G_k$.
\end{definition}

\begin{theorem}
\label{theorem-geometric-arithmetic-inverse}
Let $\mathcal{F}$ be an abelian sheaf on $X_\etale$. Then for all
$j\geq 0$, $\text{frob}_k$ acts on the cohomology group $H^j(X_{\bar k},
\mathcal{F}|_{X_{\bar k}})$ as the inverse of the map $\pi_X^*$.
\end{theorem}

\noindent
The map $\pi_X^*$ is defined by the composition
$$
H^j(X_{\bar k}, \mathcal{F}|_{X_{\bar k}}) \xrightarrow{{\pi_X}_{\bar k}^*}
H^j(X_{\bar k}, (\pi_X^{-1} \mathcal{F})|_{X_{\bar k}}) \cong
H^j(X_{\bar k}, \mathcal{F}|_{X_{\bar k}}).
$$
where the last isomorphism comes from the canonical isomorphism
$\pi_X^{-1} \mathcal{F} \cong \mathcal{F}$ of
Lemma \ref{lemma-sheaf-over-finite-field-has-frobenius-descent}.

\begin{proof}
The composition $X_{\bar k} \xrightarrow{\Spec(\text{frob}_k)} X_{\bar k}
\xrightarrow{\pi_X} X_{\bar k}$ is equal to $F_{X_{\bar k}}^f$, hence the
result follows from the baffling theorem suitably generalized to nontrivial
coefficients. Note that the previous composition commutes in the sense that
$F_{X_{\bar k}}^f = \pi_X \circ \Spec(\text{frob}_k) =
\Spec(\text{frob}_k) \circ \pi_X$.
\end{proof}

\begin{definition}
\label{definition-geometric-frobenius-on-stalk}
If $x \in X(k)$ is a rational point and $\bar x : \Spec(\bar k) \to X$
the geometric point lying over $x$, we let $\pi_x : \mathcal{F}_{\bar x} \to
\mathcal{F}_{\bar x}$ denote the action by $\text{frob}_k^{-1}$ and call it the
{\it geometric frobenius}\footnote{This notation is not standard.
This operator is denoted $F_x$ in \cite{SGA4.5}. We will likely change
this notation in the future.}
\end{definition}

\noindent
We can now make a more precise statement (albeit a false one) of the trace
formula (\ref{equation-trace-formula-initial}). Let $X$ be a finite
type scheme of dimension 1
over a finite field $k$, $\ell$ a prime number and $\mathcal{F}$ a
constructible, flat $\mathbf{Z}/\ell^n\mathbf{Z}$ sheaf. Then
\begin{equation}
\label{equation-trace-formula-second}
\sum\nolimits_{x \in X(k)}
\text{Tr}(\pi_x | \mathcal{F}_{\bar x})
=
\sum\nolimits_{i = 0}^2
(-1)^i \text{Tr}(\pi_X^* | H^i_c(X_{\bar k}, \mathcal{F}))
\end{equation}
as elements of $\mathbf{Z}/\ell^n\mathbf{Z}$. The reason this equation is wrong
is that the trace in the right-hand side does not make sense for the kind of
sheaves considered. Before addressing this issue, we try to motivate the
appearance of the geometric frobenius (apart from the fact that it is a natural
morphism!).

\medskip\noindent
Let us consider the case where $X = \mathbf{P}^1_k$ and $\mathcal{F} =
\underline{\mathbf{Z}/\ell\mathbf{Z}}$. For any point, the Galois module
$\mathcal{F}_{\bar x}$ is trivial, hence for any morphism $\varphi$ acting on
$\mathcal{F}_{\bar x}$, the left-hand side is
$$
\sum\nolimits_{x \in X(k)} \text{Tr}(\varphi | \mathcal{F}_{\bar x}) =
\#\mathbf{P}^1_k(k) = q+1.
$$
Now $\mathbf{P}^1_k$ is proper, so compactly supported cohomology equals
standard cohomology, and so for a morphism $\pi : \mathbf{P}^1_k \to
\mathbf{P}^1_k$, the right-hand side equals
$$
\text{Tr}(\pi^* | H^0 (\mathbf{P}^1_{\bar k},
\underline{\mathbf{Z}/\ell\mathbf{Z}})) + \text{Tr}(\pi^* | H^2
(\mathbf{P}^1_{\bar k}, \underline{\mathbf{Z}/\ell\mathbf{Z}})).
$$
The Galois module $H^0 (\mathbf{P}^1_{\bar k},
\underline{\mathbf{Z}/\ell\mathbf{Z}}) = \mathbf{Z}/\ell\mathbf{Z}$ is trivial,
since the pullback of the identity is the identity. Hence the first trace is 1,
regardless of $\pi$. For the second trace, we need to compute the pullback
$\pi^* : H^2(\mathbf{P}^1_{\bar k}, \underline{\mathbf{Z}/\ell\mathbf{Z}}))$
for a map $\pi : \mathbf{P}^1_{\bar k} \to \mathbf{P}^1_{\bar k}$. This is a
good exercise and the answer is multiplication by the degree of $\pi$
(for a proof see
\'Etale Cohomology, Lemma \ref{etale-cohomology-lemma-pullback-on-h2-curve}).
In other words, this works as in the familiar situation of complex cohomology.
In particular, if $\pi$ is the geometric frobenius we get
$$
\text{Tr}(\pi_X^* | H^2 (\mathbf{P}^1_{\bar k},
\underline{\mathbf{Z}/\ell\mathbf{Z}})) = q
$$
and if $\pi$ is the arithmetic frobenius then we get
$$
\text{Tr}(\text{frob}_k^* | H^2 (\mathbf{P}^1_{\bar k},
\underline{\mathbf{Z}/\ell\mathbf{Z}})) = q^{-1}.
$$
The latter option is clearly wrong.

\begin{remark}
\label{remark-compute-degree-lifting}
The computation of the degrees can be done by lifting (in some obvious sense)
to characteristic 0 and considering the situation with complex coefficients.
This method almost never works, since lifting is in general impossible for
schemes which are not projective space.
\end{remark}

\noindent
The question remains as to why we have to consider compactly supported
cohomology. In fact, in view of Poincar\'e duality, it is not strictly
necessary for smooth varieties, but it involves adding in certain powers
of $q$. For example, let us consider the case where
$X = \mathbf{A}^1_k$ and
$\mathcal{F} = \underline{\mathbf{Z}/\ell\mathbf{Z}}$.
The action on stalks is again trivial, so we only need look at the action
on cohomology. But then $\pi_X^*$ acts as the identity on
$H^0(\mathbf{A}^1_{\bar k}, \underline{\mathbf{Z}/\ell\mathbf{Z}})$
and as multiplication by $q$ on
$H^2_c(\mathbf{A}^1_{\bar k}, \underline{\mathbf{Z}/\ell\mathbf{Z}})$.




\section{Traces}
\label{section-traces}

\noindent
We now explain how to take the trace of an endomorphism of a module over a
noncommutative ring. Fix a finite ring $\Lambda$ with cardinality prime to $p$.
Typically, $\Lambda$ is the group ring $(\mathbf{Z}/\ell^n\mathbf{Z})[G]$ for
some finite group $G$. By convention, all the $\Lambda$-modules considered will
be left $\Lambda$-modules.

\medskip\noindent
We introduce the following notation:
We set $\Lambda^\natural$ to be the quotient of $\Lambda$ by its additive
subgroup generated by the commutators (i.e., the elements of the form
$ab-ba$, $a, b \in \Lambda$). Note that $\Lambda^\natural$ is not a ring.

\medskip\noindent
For instance, the module $(\mathbf{Z}/\ell^n\mathbf{Z})[G]^\natural$ is the
dual of the class functions, so
$$
(\mathbf{Z}/\ell^n\mathbf{Z})[G]^\natural
=
\bigoplus\nolimits_{\text{conjugacy classes of }G}
\mathbf{Z}/\ell^n\mathbf{Z}.
$$
For a free $\Lambda$-module, we have $\text{End}_\Lambda(\Lambda^{\oplus m}) =
\text{Mat}_n(\Lambda)$. Note that since the modules are left modules,
representation of endomorphism by matrices is a right action: if $a \in
\text{End}(\Lambda^{\oplus m})$ has matrix $A$ and $v \in \Lambda$, then $a(v)
= v A$.

\begin{definition}
\label{definition-trace}
The {\it trace} of the endomorphism $a$ is the sum of the diagonal entries of
a matrix representing it. This defines an additive map $\text{Tr} :
\text{End}_\Lambda(\Lambda^{\oplus m}) \to \Lambda^\natural$.
\end{definition}

\begin{exercise}
\label{exercise-trace-is-trace}
Given maps
$$
\Lambda^{\oplus m} \xrightarrow{a} \Lambda^{\oplus n}
\quad\text{and}\quad
\Lambda^{\oplus n} \xrightarrow{b} \Lambda^{\oplus m}
$$
show that $\text{Tr}(ab) = \text{Tr}(ba)$.
\end{exercise}

\noindent
We extend the definition of the trace to a finite projective $\Lambda$-module
$P$ and an endomorphism $\varphi$ of $P$ as follows. Write $P$ as the summand
of a free $\Lambda$-module, i.e., consider maps $P \xrightarrow{a}
\Lambda^{\oplus n} \xrightarrow{b} P$ with
\begin{enumerate}
\item
$\Lambda^{\oplus n} = \Im(a) \oplus \Ker(b)$; and
\item
$b\circ a = \text{id}_P$.
\end{enumerate}
Then we set $\text{Tr}(\varphi) = \text{Tr}(a\varphi b)$. It is easy to check
that this is well-defined, using the previous exercise.








\section{Why derived categories?}
\label{section-derived-categories-why}

\noindent
With this definition of the trace, let us now discuss another issue with the
formula as stated. Let $C$ be a smooth projective curve over $k$. Then there is
a correspondence between finite locally constant sheaves $\mathcal{F}$ on
$C_\etale$ whose stalks are isomorphic to
${(\mathbf{Z}/\ell^n\mathbf{Z})}^{\oplus m}$ on the one hand, and continuous
representations $\rho : \pi_1 (C, \bar c) \to
\text{GL}_m(\mathbf{Z}/\ell^n\mathbf{Z}))$ (for some fixed choice of $\bar c$)
on the other hand. We denote $\mathcal{F}_\rho$ the sheaf corresponding to
$\rho$. Then $H^2 (C_{\bar k}, \mathcal{F}_\rho)$ is the group of coinvariants
for the action of $\rho(\pi_1 (C, \bar c))$ on
${(\mathbf{Z}/\ell^n\mathbf{Z})}^{\oplus m}$, and there is a short exact
sequence
$$
0 \longrightarrow \pi_1 (C_{\bar k}, \bar c) \longrightarrow \pi_1 (C, \bar c)
\longrightarrow G_k \longrightarrow 0.
$$
For instance, let $\mathbf{Z} = \mathbf{Z} \sigma$ act on
$\mathbf{Z}/\ell^2\mathbf{Z}$ via $\sigma(x) = (1+\ell) x$. The coinvariants
are $(\mathbf{Z}/\ell^2\mathbf{Z})_{\sigma} = \mathbf{Z}/\ell\mathbf{Z}$, which
is not a flat $\mathbf{Z}/\ell^2\mathbf{Z}$-module. Hence we cannot take the
trace of some action on $H^2(C_{\bar k}, \mathcal{F}_\rho)$, at least not in
the sense of the previous section.

\medskip\noindent
In fact, our goal is to consider a trace formula for $\ell$-adic coefficients.
But $\mathbf{Q}_\ell = \mathbf{Z}_\ell[1/\ell]$ and $\mathbf{Z}_\ell =
\lim \mathbf{Z}/\ell^n\mathbf{Z}$, and even for a flat
$\mathbf{Z}/\ell^n\mathbf{Z}$ sheaf, the individual cohomology groups may not
be flat, so we cannot compute traces. One possible remedy is consider the total
derived complex $R\Gamma(C_{\bar k}, \mathcal{F}_\rho)$ in the derived category
$D(\mathbf{Z}/\ell^n\mathbf{Z})$ and show that it is a perfect object, which
means that it is quasi-isomorphic to a finite complex of finite free module.
For such complexes, we can define the trace, but this will require an account
of derived categories.






\section{Derived categories}
\label{section-derived-categories}

\noindent
To set up notation, let $\mathcal{A}$ be an abelian category. Let
$\text{Comp}(\mathcal{A})$ be the abelian category of complexes in
$\mathcal{A}$. Let $K(\mathcal{A})$ be the category of complexes up to
homotopy, with objects equal to complexes in $\mathcal{A}$ and morphisms
equal to
homotopy classes of morphisms of complexes. This is not an abelian category.
Loosely speaking, $D(A)$ is defined to be the category obtained by inverting
all quasi-isomorphisms in $\text{Comp}(\mathcal{A})$ or, equivalently, in
$K(\mathcal{A})$. Moreover, we can define $\text{Comp}^+(\mathcal{A}),
K^+(\mathcal{A}), D^+(\mathcal{A})$ analogously using only bounded below
complexes. Similarly, we can define $\text{Comp}^-(\mathcal{A}),
K^-(\mathcal{A}), D^-(\mathcal{A})$ using bounded above complexes, and we can
define $\text{Comp}^b(\mathcal{A}), K^b(\mathcal{A}), D^b(\mathcal{A})$ using
bounded complexes.

\begin{remark}
\label{remarks-derived-categories}
Notes on derived categories.
\begin{enumerate}
\item
There are some set-theoretical problems when $\mathcal{A}$ is somewhat
arbitrary, which we will happily disregard.
\item
The categories $K(A)$ and $D(A)$ are endowed with the structure of a
triangulated category.
\item
The categories $\text{Comp}(\mathcal{A})$ and $K(\mathcal{A})$ can also be
defined when $\mathcal{A}$ is an additive category.
\end{enumerate}
\end{remark}

\noindent
The homology functor $H^i : \text{Comp}(\mathcal{A}) \to \mathcal{A}$ taking a
complex $K^\bullet \mapsto H^i(K^\bullet)$ extends to functors $H^i :
K(\mathcal{A}) \to \mathcal{A}$ and $H^i : D(\mathcal{A}) \to \mathcal{A}$.

\begin{lemma}
\label{lemma-when-in-bounded}
An object $E$ of $D(\mathcal{A})$ is contained in $D^+(\mathcal{A})$ if and
only if $H^i(E) =0 $ for all $i \ll 0$. Similar statements hold for $D^-$ and
$D^+$.
\end{lemma}

\begin{proof}
Hint: use truncation functors. See
Derived Categories, Lemma \ref{derived-lemma-complex-cohomology-bounded}.
\end{proof}

\begin{lemma}
\label{lemma-derived-categories}
Morphisms between objects in the derived category.
\begin{enumerate}
\item
Let $I^\bullet \in \text{Comp}^+(\mathcal{A})$ with $I^n$ injective for all
$n \in \mathbf{Z}$. Then
$$
\Hom_{D(\mathcal{A})}(K^\bullet, I^\bullet)
=
\Hom_{K(\mathcal{A})}(K^\bullet, I^\bullet).
$$
\item
Let $P^\bullet \in \text{Comp}^-(\mathcal{A})$ with $P^n$ is projective for all
$n \in \mathbf{Z}$. Then
$$
\Hom_{D(\mathcal{A})}(P^\bullet, K^\bullet)
=
\Hom_{K(\mathcal{A})}(P^\bullet, K^\bullet).
$$
\item
If $\mathcal{A}$ has enough injectives and $\mathcal{I} \subset \mathcal{A}$
is the additive subcategory of injectives, then
$
D^+(\mathcal{A})\cong K^+(\mathcal{I})
$
(as triangulated categories).
\item
If $\mathcal{A}$ has enough projectives and $\mathcal{P} \subset \mathcal{A}$
is the additive subcategory of projectives, then
$
D^-(\mathcal{A}) \cong K^-(\mathcal{P}).
$
\end{enumerate}
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{definition}
\label{definition-derived-functor}
Let $F: \mathcal{A} \to \mathcal{B}$ be a left exact functor and assume that
$\mathcal{A}$ has enough injectives. We define the {\it total right derived
functor of $F$} as the functor $RF: D^+(\mathcal{A}) \to D^+(\mathcal{B})$
fitting into the diagram
$$
\xymatrix{
D^+(\mathcal{A}) \ar[r]^{RF} & D^+(\mathcal{B}) \\
K^+(\mathcal I) \ar[u] \ar[r]^F & K^+(\mathcal{B}). \ar[u]
}
$$
This is possible since the left vertical arrow is invertible by the previous
lemma. Similarly, let $G: \mathcal{A} \to \mathcal{B}$ be a right exact
functor and assume that $\mathcal{A}$ has enough projectives. We define the
{\it total left derived functor of $G$} as the functor $LG: D^-(\mathcal{A})
\to D^-(\mathcal{B})$ fitting into the diagram
$$
\xymatrix{
D^-(\mathcal{A}) \ar[r]^{LG} & D^-(\mathcal{B}) \\
K^-(\mathcal{P}) \ar[u] \ar[r]^G & K^-(\mathcal{B}). \ar[u]
}
$$
This is possible since the left vertical arrow is invertible by the previous
lemma.
\end{definition}

\begin{remark}
\label{remark-cohomology-of-derived-functor}
In these cases, it is true that $R^iF(K^\bullet) = H^i(RF(K^\bullet))$, where
the left hand side is defined to be $i$th homology of the complex
$F(K^\bullet)$.
\end{remark}




\section{Filtered derived category}
\label{section-filtered-derived-category}

\noindent
It turns out we have to do it all again and build the filtered derived
category also.

\begin{definition}
\label{definition-filtered}
Let $\mathcal{A}$ be an abelian category.
\begin{enumerate}
\item Let $\text{Fil}(\mathcal{A})$ be the category of filtered objects
$(A, F)$ of $\mathcal{A}$, where $F$ is a filtration of the form
$$
A \supset \ldots \supset F^n A \supset F^{n+1}A \supset \ldots
\supset 0.
$$
This is an additive category.
\item We denote $\text{Fil}^f(\mathcal{A})$ the full
subcategory of $\text{Fil}(\mathcal{A})$ whose objects $(A, F)$ have finite
filtration. This is also an additive category.
\item An object $I \in \text{Fil}^f(\mathcal{A})$ is called
{\it filtered injective} (respectively {\it projective}) provided
that $\text{gr}^p(I) = \text{gr}_F^p(I) = F^pI/F^{p+1}I$ is injective
(resp. projective) in $\mathcal{A}$ for all $p$.
\item The category of complexes
$\text{Comp}(\text{Fil}^f(\mathcal{A})) \supset
\text{Comp}^+(\text{Fil}^f(\mathcal{A}))$
and its homotopy category
$K(\text{Fil}^f(\mathcal{A})) \supset K^+(\text{Fil}^f(\mathcal A))$
are defined as before.
\item A morphism $\alpha : K^\bullet \to L^\bullet$ of complexes in
$\text{Comp}(\text{Fil}^f(\mathcal{A}))$ is called a
{\it filtered quasi-isomorphism} provided that
$$
\text{gr}^p(\alpha): \text{gr}^p(K^\bullet) \to \text{gr}^p(L^\bullet)
$$
is a quasi-isomorphism for all $p \in \mathbf{Z}$.
\item We define $DF(\mathcal{A})$ (resp. $DF^+(\mathcal{A})$)
by inverting the filtered quasi-isomorphisms in
$K(\text{Fil}^f(\mathcal{A}))$ (resp. $K^+(\text{Fil}^f(\mathcal{A}))$).
\end{enumerate}
\end{definition}

\begin{lemma}
\label{lemma-filtered-derived-category}
If $\mathcal{A}$ has enough injectives, then $DF^+(\mathcal{A}) \cong
K^+(\mathcal{I})$, where $\mathcal{I}$ is the full additive subcategory of
$\text{Fil}^f(\mathcal{A})$ consisting of filtered injective objects.
Similarly, if $\mathcal{A}$ has enough projectives, then $DF^-(\mathcal{A})
\cong K^+(\mathcal{P})$, where $\mathcal P$ is the full additive subcategory of
$\text{Fil}^f(\mathcal{A})$ consisting of filtered projective objects.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}





\section{Filtered derived functors}
\label{section-filtered-derived-functors}

\noindent
And then there are the filtered derived functors.

\begin{definition}
\label{definition-filtered-derived-functors}
Let $T: \mathcal{A} \to \mathcal{B}$ be a left exact functor and assume that
$\mathcal{A}$ has enough injectives. Define $RT: DF^+(\mathcal{A}) \to D
F^+(\mathcal{B})$ to fit in the diagram
$$
\xymatrix{
DF^+(\mathcal{A}) \ar[r]^{RT} & DF^+(\mathcal{B}) \\
K^+(\mathcal{I}) \ar[u] \ar[r]^{T \quad} & K^+(\text{Fil}^f(\mathcal{B})).
\ar[u]}
$$
This is well-defined by the previous lemma. Let $G: \mathcal{A} \to
\mathcal{B}$ be a right exact functor and assume that $\mathcal{A}$ has enough
projectives. Define $LG: DF^+(\mathcal{A}) \to DF^+(\mathcal{B})$ to fit in
the diagram
$$
\xymatrix{
DF^-(\mathcal{A}) \ar[r]^{LG} & DF^-(\mathcal{B}) \\
K^-(\mathcal{P}) \ar[u] \ar[r]^{G \quad} & K^-(\text{Fil}^f(\mathcal{B})).
\ar[u]}
$$
Again, this is well-defined by the previous lemma.
The functors $RT$, resp.\ $LG$, are called the {\it filtered derived
functor} of $T$, resp.\ $G$.
\end{definition}

\begin{proposition}
\label{proposition-compare-filtered-graded}
In the situation above, we have
$$
\text{gr}^p \circ RT = RT \circ \text{gr}^p
$$
where the $RT$ on the left is the filtered derived functor while the one on the
right is the total derived functor. That is, there is a commuting diagram
$$
\xymatrix{
DF^+(\mathcal{A}) \ar[r]^{RT} \ar[d]_{\text{gr}^p} & DF^+(\mathcal{B})
\ar[d]^{\text{gr}^p}\\
D^+(\mathcal{A}) \ar[r]^{RT} & D^+(\mathcal{B}).}
$$
\end{proposition}

\begin{proof}
Omitted.
\end{proof}

\noindent
Given $K^\bullet \in DF^+(\mathcal{B})$, we get a spectral sequence
$$
E_1^{p, q} = H^{p+q}(\text{gr}^p K^\bullet) \Rightarrow H^{p+q}(\text{forget
filt}(K^\bullet)).
$$






\section{Application of filtered complexes}
\label{section-applications-filtered}

\noindent
Let $\mathcal{A}$ be an abelian category with enough injectives, and
$0 \to L \to M \to N \to 0$ a short exact sequence in $\mathcal{A}$.
Consider $\widetilde M \in \text{Fil}^f(\mathcal{A})$ to be $M$ along with the
filtration defined by
$$
F^1M = L, \ F^nM = M
\text{ for }n \leq 0\text{, and }F^nM = 0\text{ for }n \geq 2.
$$
By definition, we have
$$
\text{forget filt}(\widetilde M) = M, \quad
\text{gr}^0(\widetilde M) = N, \quad
\text{gr}^1(\widetilde M) = L
$$
and $\text{gr}^n(\widetilde M) = 0$ for all other $n \neq 0, 1$. Let $T:
\mathcal{A} \to \mathcal{B}$ be a left exact functor. Assume that $\mathcal{A}$
has enough injectives. Then $RT(\widetilde M) \in DF^+(\mathcal{B})$ is a
filtered complex with
$$
\text{gr}^p(RT(\widetilde M))
\stackrel{\text{qis}}{=}
\left\{
\begin{matrix}
0 & \text{if} & p \neq 0, 1, \\
RT(N) & \text{if} & p = 0, \\
RT(L) & \text{if} & p = 1.
\end{matrix}
\right.
$$
and $\text{forget filt}(RT(\widetilde M))\stackrel{\text{qis}}{ = } RT(M)$. The
spectral sequence applied to $RT(\widetilde M)$ gives
$$
E_1^{p, q} = R^{p+q}T(\text{gr}^p(\widetilde M)) \Rightarrow
R^{p+q}T(\text{forget filt}(\widetilde M)).
$$
Unwinding the spectral sequence gives us the long exact sequence
$$
\xymatrix{
0 \ar[r] & T(L) \ar[r] & T(M) \ar[r] & T(N) \ar@(rd, ul)[rdllllr] \\
& R^1T(L) \ar[r] & R^1T(M) \ar[r] & \ldots
}
$$
This will be used as follows. Let $X/k$ be a scheme of finite type. Let
$\mathcal{F}$ be a flat constructible $\mathbf{Z}/\ell^n \mathbf{Z}$-module.
Then we want to show that the trace
$$
\text{Tr}( \pi_X^\ast | R\Gamma_c(X_{\bar k}, \mathcal{F})) \in
\mathbf{Z}/\ell^n \mathbf{Z}
$$
is additive on short exact sequences. To see this, it will not be enough to
work with $R\Gamma_c(X_{\bar k}, -) \in D^+(\mathbf{Z}/\ell^n \mathbf{Z})$, but
we will have to use the filtered derived category.







%10.29.09
\section{Perfectness}
\label{section-perfect}

\noindent
Let $\Lambda$ be a (possibly noncommutative) ring, $\text{Mod}_{\Lambda}$ the
category of left $\Lambda$-modules, $K(\Lambda) = K(\text{Mod}_\Lambda)$ its
homotopy category, and $D(\Lambda)= D(\text{Mod}_\Lambda)$ the derived
category.

\begin{definition}
\label{definition-perfect}
We denote by $K_{perf}(\Lambda)$ the category whose objects are bounded
complexes of finite projective $\Lambda$-modules, and whose morphisms are
morphisms of complexes up to homotopy. The functor $K_{perf}(\Lambda)\to
D(\Lambda)$ is fully faithful (Derived Categories, Lemma
\ref{derived-lemma-morphisms-from-projective-complex}).
Denote $D_{perf}(\Lambda)$ its essential image.
An object of $D(\Lambda)$ is called {\it perfect} if it is in
$D_{perf}(\Lambda)$.
\end{definition}

\begin{proposition}
\label{proposition-trace-well-defined}
Let $K\in D_{perf}(\Lambda)$ and $f\in \text{End}_{D(\Lambda)}(K)$. Then the
trace $\text{Tr}(f)\in \Lambda^\natural$ is well defined.
\end{proposition}

\begin{proof}
We will use Derived Categories, Lemma
\ref{derived-lemma-morphisms-from-projective-complex}
without further mention in this proof.
Let $P^\bullet$ be a bounded complex of finite projective $\Lambda$-modules
and let $\alpha : P^\bullet \to K$ be an isomorphism in $D(\Lambda)$. Then
$\alpha^{-1}\circ f\circ \alpha$ corresponds to a morphism of complexes
$f^\bullet : P^\bullet \to P^\bullet$ well defined up to homotopy.
Set
$$
\text{Tr}(f) = \sum_i (-1)^i \text{Tr}(f^i : P^i \to P^i) \in \Lambda^\natural.
$$
Given $P^\bullet$ and $\alpha$, this is independent of the choice of
$f^\bullet$. Namely, any other choice is of the form
$\tilde{f}^\bullet = f^\bullet + dh +hd$ for some
$h^i : P^i \to P^{i-1}(i\in \mathbf{Z})$. But
\begin{eqnarray*}
\text{Tr}(dh) & = & \sum_i (-1)^i \text{Tr}(P^i\xrightarrow{dh} P^i) \\
& = & \sum_i (-1)^i \text{Tr}(P^{i-1}\xrightarrow{hd} P^{i-1}) \\
& = & -\sum_i (-1)^{i-1}\text{Tr}(P^{i-1}\xrightarrow{hd} P^{i-1}) \\
& = & - \text{Tr}(hd)
\end{eqnarray*}
and so $\sum_i (-1)^i \text{Tr} ((dh+hd)|_{P^i})=0$.
Furthermore, this is independent of the choice of $(P^\bullet , \alpha)$:
suppose $(Q^\bullet, \beta)$ is another choice. The compositions
$$
Q^\bullet \xrightarrow{\beta} K \xrightarrow{\alpha^{-1}} P^\bullet
\quad\text{and}\quad
P^\bullet \xrightarrow{\alpha} K \xrightarrow{\beta^{-1}} Q^\bullet
$$
are representable by morphisms of complexes $\gamma_1^\bullet$ and
$\gamma_2^\bullet$ respectively, such that $\gamma_1^\bullet \circ
\gamma_2^\bullet$ is homotopic to the identity. Thus, the morphism of complexes
$\gamma_2^\bullet\circ f^\bullet\circ \gamma_1^\bullet : Q^\bullet\to Q^\bullet$
represents the morphism $\beta^{-1}\circ f\circ\beta$ in $D(\Lambda)$. Now
\begin{eqnarray*}
\text{Tr}(\gamma_2^\bullet\circ f^\bullet\circ\gamma_1^\bullet|_{Q^\bullet}) &
= & \text{Tr}(\gamma_1^\bullet \circ\gamma_2^\bullet \circ
f^\bullet|_{P^\bullet})\\
& = & \text{Tr}(f^\bullet|_{P^\bullet})
\end{eqnarray*}
by the fact that $\gamma_1^\bullet \circ \gamma_2^\bullet$ is homotopic to the
identity and the independence of the choice of $f^\bullet$ we saw above.
\end{proof}




\section{Filtrations and perfect complexes}
\label{section-filtrations-perfect}

\noindent
We now present a filtered version of the category of perfect complexes. An
object $(M, F)$ of $\text{Fil}^f(\text{Mod}_\Lambda)$ is called {\it filtered
finite projective} if for all $p$, $\text{gr}^p_F (M)$ is finite and
projective. We then consider the homotopy category
$KF_{\text{perf}}(\Lambda)$ of bounded complexes of filtered finite
projective objects of $\text{Fil}^f(\text{Mod}_\Lambda)$. We have a diagram of
categories
$$
\begin{matrix}
KF(\Lambda) & \supset & KF_{\text{perf}}(\Lambda)\\
\downarrow & & \downarrow\\
DF(\Lambda) & \supset & DF_{\text{perf}}(\Lambda)
\end{matrix}
$$
where the vertical functor on the right is fully faithful and the category
$DF_{\text{perf}}(\Lambda)$ is its essential image, as before.

\begin{lemma}[Additivity]
\label{lemma-additivity}
Let $K\in DF_{\text{perf}}(\Lambda)$ and $f\in
\text{End}_{DF}(K)$. Then
$$
\text{Tr}(f|_K) =
\sum\nolimits_{p\in \mathbf{Z}} \text{Tr}(f|_{\text{gr}^p K}).
$$
\end{lemma}

\begin{proof}
By Proposition \ref{proposition-trace-well-defined}, we may assume we have
a bounded
complex $P^\bullet$ of filtered finite projectives of
$\text{Fil}^f(\text{Mod}_\Lambda)$ and a map $f^\bullet : P^\bullet\to
P^\bullet$ in $\text{Comp}(\text{Fil}^f(\text{Mod}_\Lambda))$. So the lemma
follows from the following result, which proof is left to the reader.
\end{proof}

\begin{lemma}
\label{lemma-additive-filtered-finite-projective}
Let $P \in \text{Fil}^f(\text{Mod}_\Lambda)$ be filtered finite projective, and
$f : P \to P$ an endomorphism in $\text{Fil}^f(\text{Mod}_\Lambda)$. Then
$$
\text{Tr}(f|_P) =
\sum\nolimits_p \text{Tr}(f|_{\text{gr}^p(P)}).
$$
\end{lemma}

\begin{proof}
Omitted.
\end{proof}







\section{Characterizing perfect objects}
\label{section-characterizing-perfect}

\noindent
For the commutative case see
More on Algebra, Sections
\ref{more-algebra-section-pseudo-coherent},
\ref{more-algebra-section-tor}, and
\ref{more-algebra-section-perfect}.

\begin{definition}
\label{definition-finite-tor-dimension}
Let $\Lambda$ be a (possibly noncommutative) ring.
An object $K\in D(\Lambda)$ has {\it finite $\text{Tor}$-dimension}
if there exist $a, b \in \mathbf{Z}$ such that for any
right $\Lambda$-module $N$, we have
$H^i(N \otimes_{\Lambda}^\mathbf{L} K) = 0$ for all
$i \not \in [a, b]$.
\end{definition}

\noindent
This in particular means that $K \in D^b(\Lambda)$ as we see by taking
$N = \Lambda$.

\begin{lemma}
\label{lemma-characterize-perfect}
Let $\Lambda$ be a left Noetherian ring and $K\in D(\Lambda)$. Then $K$ is
perfect if and only if the two following conditions hold:
\begin{enumerate}
\item
$K$ has finite $\text{Tor}$-dimension, and
\item
for all $i \in \mathbf{Z}$, $H^i(K)$ is a finite $\Lambda$-module.
\end{enumerate}
\end{lemma}

\begin{proof}
See More on Algebra, Lemma \ref{more-algebra-lemma-perfect}
for the proof in the commutative case.
\end{proof}

\noindent
The reader is strongly urged to try and prove this. The proof relies on the
fact that a finite module on a finitely left-presented ring is flat if and only
if it is projective.

\begin{remark}
\label{remark-variant}
A variant of this lemma is to consider a Noetherian scheme $X$
and the category $D_{perf}(\mathcal{O}_X)$ of complexes which are locally
quasi-isomorphic to a finite complex of finite locally free
$\mathcal{O}_X$-modules. Objects $K$ of $D_{perf}(\mathcal{O}_X)$
can be characterized by having coherent cohomology sheaves and
bounded tor dimension.
\end{remark}








\section{Cohomology of nice complexes}
\label{section-cohomology-ctf}

\noindent
The following is a special case of a more general result about
compactly supported cohomology of objects of $D_{ctf}(X, \Lambda)$.

\begin{proposition}
\label{proposition-projective-curve-constructible-cohomology}
Let $X$ be a projective curve over a field $k$, $\Lambda$ a finite ring and
$K\in D_{ctf}(X, \Lambda)$. Then $R\Gamma(X_{\bar k}, K)\in
D_{perf}(\Lambda)$.
\end{proposition}

\begin{proof}[Sketch of proof.]
The first step is to show:
\begin{enumerate}
\item[(1)]
{\it The cohomology of $R\Gamma(X_{\bar k}, K)$ is bounded.}
\end{enumerate}
Consider the spectral sequence
$$
H^i(X_{\bar k}, \underline H^j(K))
\Rightarrow
H^{i+j} (R\Gamma(X_{\bar k}, K)).
$$
Since $K$ is bounded and $\Lambda$ is finite, the sheaves $\underline H^j(K)$
are torsion. Moreover, $X_{\bar k}$ has finite cohomological dimension, so the
left-hand side is nonzero for finitely many $i$ and $j$ only. Therefore, so is
the right-hand side.
\begin{enumerate}
\item[(2)]
{\it The cohomology groups $H^{i+j} (R\Gamma(X_{\bar k}, K))$ are finite.}
\end{enumerate}
Since the sheaves $\underline H^j(K)$ are constructible, the groups
$H^i(X_{\bar k}, \underline H^j(K))$ are finite
(\'Etale Cohomology, Section \ref{etale-cohomology-section-vanishing-torsion})
so it follows by the spectral sequence again.
\begin{enumerate}
\item[(3)]
{\it $R\Gamma(X_{\bar k}, K)$ has finite $\text{Tor}$-dimension.}
\end{enumerate}
Let $N$ be a right $\Lambda$-module (in fact, since $\Lambda$ is finite, it
suffices to assume that $N$ is finite). By the projection formula (change of
module),
$$
N \otimes^\mathbf{L}_\Lambda R \Gamma(X_{\bar k}, K) = R\Gamma(X_{\bar k},
N \otimes^\mathbf{L}_\Lambda K).
$$
Therefore,
$$
H^i (N \otimes^\mathbf{L}_\Lambda R\Gamma(X_{\bar k}, K)) = H^i(R\Gamma(X_{\bar
k}, N \otimes_{\Lambda}^\mathbf{L} K)).
$$
Now consider the spectral sequence
$$
H^i (X_{\bar k}, \underline H^j (N \otimes_{\Lambda}^\mathbf{L} K))
\Rightarrow
H^{i+j}(R\Gamma(X_{\bar k}, N \otimes_{\Lambda}^\mathbf{L} K)).
$$
Since $K$ has finite $\text{Tor}$-dimension, $\underline H^j
(N \otimes_{\Lambda}^\mathbf{L} K)$ vanishes universally for $j$ small enough,
and the left-hand side vanishes whenever $i < 0$. Therefore $R\Gamma(X_{\bar
k}, K)$ has finite $\text{Tor}$-dimension, as claimed. So it is a perfect
complex by Lemma \ref{lemma-characterize-perfect}.
\end{proof}





\section{Lefschetz numbers}
\label{section-lefschetz-numbers}

\noindent
The fact that the total cohomology of a constructible complex of finite tor
dimension is a perfect complex is the key technical reason why cohomology
behaves well, and allows us to define rigorously the traces occurring in the
trace formula.

\begin{definition}
\label{definition-global-lefschetz-number}
Let $\Lambda$ be a finite ring, $X$ a projective curve over a finite field $k$
and $K \in D_{ctf}(X, \Lambda)$ (for instance $K = \underline\Lambda$).
There is a canonical map $c_K : \pi_X^{-1}K \to K$, and its base change
$c_K|_{X_{\bar k}}$ induces an action denoted $\pi_X^*$ on the perfect
complex $R\Gamma(X_{\bar k}, K|_{X_{\bar k}})$. The
{\it global Lefschetz number} of $K$ is the trace
$\text{Tr}(\pi_X^* |_{R\Gamma(X_{\bar k}, K)})$ of that action.
It is an element of $\Lambda^\natural$.
\end{definition}

\begin{definition}
\label{definition-local-lefschetz-number}
With $\Lambda, X, k, K$ as in
Definition \ref{definition-global-lefschetz-number}.
Since $K\in D_{ctf}(X, \Lambda)$, for any geometric point $\bar x$ of $X$,
the complex $K_{\bar x}$ is a perfect complex (in $D_{perf}(\Lambda)$). As we
have seen in Section \ref{section-frobenii}, the Frobenius $\pi_X$ acts on
$K_{\bar x}$. The {\it local Lefschetz number} of $K$ is the sum
$$
\sum\nolimits_{x\in X(k)} \text{Tr}(\pi_X |_{K_{\overline{x}}})
$$
which is again an element of $\Lambda^\natural$.
\end{definition}

\noindent
At last, we can formulate precisely the trace formula.

\begin{theorem}[Lefschetz Trace Formula]
\label{theorem-trace}
Let $X$ be a projective curve over a finite field $k$, $\Lambda$ a finite ring
and $K \in D_{ctf}(X, \Lambda)$. Then the global and local Lefschetz numbers
of $K$ are equal, i.e.,
\begin{equation}
\label{equation-trace-formula}
\text{Tr}(\pi^*_X |_{R\Gamma(X_{\bar k}, K)})
=
\sum\nolimits_{x\in X(k)} \text{Tr}(\pi_X |_{K_{\bar x}})
\end{equation}
in $\Lambda^\natural$.
\end{theorem}

\begin{proof}
See discussion below.
\end{proof}

%11.5.09
\noindent
We will use, rather than prove, the trace formula. Nevertheless, we will
give quite a few details of the proof of the theorem as given in
\cite{SGA4.5} (some of the things that are not adequately explained
are listed in Section \ref{section-list-skipped}).

\medskip\noindent
We only stated the formula for curves, and in some weak
sense it is a consequence of the following result.

\begin{theorem}[Weil]
\label{theorem-weil-trace-formula}
Let $C$ be a nonsingular projective curve over an algebraically closed field
$k$, and $\varphi : C \to C$ a $k$-endomorphism of $C$ distinct from the
identity. Let $V(\varphi) = \Delta_C \cdot \Gamma_\varphi$, where $\Delta_C$ is
the diagonal, $\Gamma_\varphi$ is the graph of $\varphi$, and the intersection
number is taken on $C \times C$. Let $J = \underline{\Picardfunctor}^0_{C/k}$
be the jacobian of $C$ and denote $\varphi^* : J \to J$ the action induced by
$\varphi$ by taking pullbacks. Then
$$
V(\varphi) = 1 - \text{Tr}_J(\varphi^*) + \deg \varphi.
$$
\end{theorem}

\begin{proof}
The number $V(\varphi)$ is the number of fixed points of $\varphi$, it is equal
to
$$
V(\varphi) =
\sum\nolimits_{c \in |C| : \varphi(c) = c} m_{\text{Fix}(\varphi)} (c)
$$
where $m_{\text{Fix}(\varphi)} (c)$ is the multiplicity of $c$ as a fixed point
of $\varphi$, namely the order or vanishing of the image of a local uniformizer
under $\varphi - \text{id}_C$. Proofs of this theorem can be found in
\cite{Lang} and \cite{Weil}.
\end{proof}

\begin{example}
\label{example-elliptic-curve}
Let $C = E$ be an elliptic curve and $\varphi = [n]$ be multiplication by $n$.
Then $\varphi^* = \varphi^t$ is multiplication by $n$ on the jacobian, so it
has trace $2n$ and degree $n^2$. On the other hand, the fixed points of
$\varphi$ are the points $p \in E$ such that $n p = p$, which is the
$(n-1)$-torsion, which has cardinality $(n-1)^2$. So the theorem reads
$$
(n-1)^2 = 1 - 2n + n^2.
$$
\end{example}

\noindent
{\bf Jacobians.}
We now discuss without proofs the correspondence between a curve and its
jacobian which is used in Weil's proof. Let $C$ be a nonsingular projective
curve over an algebraically closed field $k$ and choose a base point $c_0 \in
C(k)$. Denote by $A^1(C \times C)$ (or $\Pic(C \times C)$, or
$\text{CaCl}(C \times C)$) the abelian group of codimension 1 divisors of
$C \times C$. Then
$$
A^1(C \times C) = \text{pr}_1^* (A^1(C)) \oplus \text{pr}_2^* (A^1(C)) \oplus R
$$
where
$$
R = \{ Z \in A^1(C \times C) \ |
\ Z|_{C \times \{c_0\}} \sim_\text{rat} 0
\text{ and }
Z|_{\{c_0\} \times C} \sim_\text{rat} 0 \}.
$$
In other words,
$R$ is the subgroup of line bundles which pull back to the trivial one under
either projection. Then there is a canonical isomorphism of abelian groups $R
\cong \text{End}(J)$ which maps a divisor $Z$ in $R$ to the endomorphism
$$
\begin{matrix}
J & \to & J \\
\left[ \mathcal{O}_C(D) \right] & \mapsto & (\text{pr}_1 |_Z)_* (\text{pr}_2
|_Z)^* (D).
\end{matrix}
$$
The aforementioned correspondence is the following. We denote by $\sigma$ the
automorphism of $C \times C$ that switches the factors.
$$
\begin{matrix}
\hline & \\
\text{End}(J) & R \\
& \\
\hline & \\
\text{composition of }\alpha, \beta &
{\text{pr}_{13}}_* ({\text{pr}_{12}}^*(\alpha) \circ {\text{pr}_{23}}^*(\beta))
\\
& \\
\text{id}_J &
\Delta_C - \{c_0\} \times C - C \times \{c_0\} \\
& \\
\varphi^* &
\Gamma_\varphi - C \times \{\varphi(c_0)\}
- \sum_{\varphi(c) = c_0} \{c\} \times C \\
& \\
{
\begin{matrix}
\text{the trace form} \\
\alpha, \beta \mapsto \text{Tr}(\alpha \beta)
\end{matrix}
}
&
\alpha, \beta \mapsto - \int_{C \times C} \alpha . \sigma^*\beta
\\
& \\
{
\begin{matrix}
\text{the Rosati involution} \\
\alpha \mapsto \alpha^\dagger
\end{matrix}
}
&
\alpha \mapsto \sigma^*\alpha
\\
& \\
{
\begin{matrix}
\text{positivity of Rosati} \\
\text{Tr}(\alpha\alpha^\dagger) > 0
\end{matrix}
}
&
{
\begin{matrix}
\text{Hodge index theorem on }C \times C \\
- \int_{C \times C} \alpha \sigma^*\alpha > 0.
\end{matrix}
}
\\
& \\
\hline 
\end{matrix}
$$
In fact, in light of the Kunneth formula, the subgroup $R$ corresponds to the
$1, 1$ hodge classes in $H^1(C)\otimes H^1(C)$.

\medskip\noindent
{\bf Weil's proof.} Using this correspondence, we can prove the trace
formula. We have
\begin{eqnarray*}
V(\varphi) & = & \int_{C \times C} \Gamma_\varphi.\Delta \\
& = & \int_{C \times C} \Gamma_\varphi. \left(\Delta_C - \{c_0\} \times C - C
\times \{c_0\}\right) + \int_{C \times C} \Gamma_\varphi. \left(\{c_0\} \times C
+ C \times \{c_0\}\right).
\end{eqnarray*}
Now, on the one hand
$$
\int_{C \times C} \Gamma_\varphi. \left(\{c_0\} \times C + C \times
\{c_0\}\right)
=
1 + \deg \varphi
$$
and on the other hand, since $R$ is the orthogonal of the ample divisor
$\{c_0\} \times C + C \times \{c_0\}$,
\begin{eqnarray*}
& &
\int_{C \times C} \Gamma_\varphi. \left(\Delta_C - \{c_0\} \times C - C \times
\{c_0\}\right) \\
& = &
\int_{C \times C} \left(\Gamma_\varphi - C \times \{\varphi(c_0)\} -
\sum_{\varphi(c) = c_0} \{c\} \times C \right). \left(\Delta_C - \{c_0\} \times
C - C \times \{c_0\}\right) \\
& = & - \text{Tr}_J (\varphi^* \circ \text{id}_J).
\end{eqnarray*}
Recapitulating, we have
$$
V(\varphi) = 1 - \text{Tr}_J (\varphi^*) + \deg \varphi
$$
which is the trace formula.

\begin{lemma}
\label{lemma-weil-mod}
Consider the situation of
Theorem \ref{theorem-weil-trace-formula}
and let $\ell$ be a prime number invertible in $k$. Then
$$
\sum\nolimits_{i = 0}^2
(-1)^i
\text{Tr}(\varphi^* |_{H^i (C, \underline{\mathbf{Z}/\ell^n \mathbf{Z}})})
=
V(\varphi) \mod \ell^n.
$$
\end{lemma}

\begin{proof}[Sketch of proof]
Observe first that the assumption makes sense because $H^i(C,
\underline{\mathbf{Z}/\ell^n \mathbf{Z}})$ is a free $\mathbf{Z}/\ell^n
\mathbf{Z}$-module for all $i$. The trace of $\varphi^*$ on the 0th degree
cohomology is 1. The choice of a primitive $\ell^n$th root of unity in $k$
gives an isomorphism
$$
H^i(C, \underline{\mathbf{Z}/\ell^n \mathbf{Z}}) \cong H^i(C, \mu_{\ell^n})
$$
compatibly with the action of the geometric Frobenius. On the other hand,
$H^1(C, \mu_{\ell^n}) = J[\ell^n]$. Therefore,
\begin{eqnarray*}
\text{Tr}(\varphi^* |_{H^1 (C, \underline{\mathbf{Z}/\ell^n \mathbf{Z}})})) & =
& \text{Tr}_J (\varphi^*) \mod \ell^n \\
& = & \text{Tr}_{\mathbf{Z}/\ell^n \mathbf{Z}} (\varphi^* : J[\ell^n] \to
J[\ell^n]).
\end{eqnarray*}
Moreover, $H^2(C, \mu_{\ell^n}) = \Pic(C)/\ell^n\Pic(C) \cong
\mathbf{Z}/\ell^n \mathbf{Z}$ where $\varphi^*$ is multiplication by $\deg
\varphi$. Hence
$$
\text{Tr} (\varphi^*|_{H^2 (C, \underline{\mathbf{Z}/\ell^n \mathbf{Z}})}) =
\deg \varphi.
$$
Thus we have
$$
\sum_{i = 0}^2 (-1)^i
\text{Tr}(\varphi^* |_{H^i (C, \underline{\mathbf{Z}/\ell^n \mathbf{Z}})}) =
1 - \text{Tr}_J(\varphi^*) + \deg \varphi \mod \ell^n
$$
and the corollary follows from Theorem \ref{theorem-weil-trace-formula}.
\end{proof}

\noindent
An alternative way to prove this corollary is to show that
$$
X \mapsto H^* (X, \mathbf{Q}_\ell) =
\mathbf{Q}_\ell \otimes
\lim_n H^*(X, \mathbf{Z}/\ell^n\mathbf{Z})
$$
defines a Weil cohomology theory on smooth projective varieties over $k$. Then
the trace formula
$$
V(\varphi) = \sum_{i = 0}^2 (-1)^i
\text{Tr}(\varphi^* |_{H^i(C, \mathbf{Q}_\ell)})
$$
is a formal consequence of the axioms (it's an exercise in linear algebra, the
proof is the same as in the topological case).




%11.10.09
\section{Preliminaries and sorites}
\label{section-preliminaries}

\noindent
Notation:
We fix the notation for this section. We denote by $A$ a commutative ring,
$\Lambda$ a (possibly noncommutative) ring with a ring map $A\to \Lambda$ which
image lies in the center of $\Lambda$. We let $G$ be a finite group, $\Gamma$ a
{\it monoid extension of $G$ by $\mathbf{N}$}, meaning that there is an exact
sequence
$$
1\to G\to \tilde\Gamma\to \mathbf{Z}\to 1
$$
and $\Gamma$ consists of those elements of $\tilde\Gamma$ which image is
nonnegative. Finally, we let $P$ be an $A[\Gamma]$-module which is finite and
projective as an $A[G]$-module, and $M$ a $\Lambda[\Gamma]$-module which is
finite and projective as a $\Lambda$-module.

\medskip\noindent
Our goal is to compute the trace of $1 \in \mathbf{N}$ acting over $\Lambda$
on the coinvariants of $G$ on $P \otimes_A M$, that is, the number
$$
\text{Tr}_{\Lambda}\left(1; \left(P \otimes_A M\right)_G\right) \in
\Lambda^\natural.
$$
The element $1\in \mathbf{N}$ will correspond to the Frobenius.

\begin{lemma}
\label{lemma-epsilon}
Let $e\in G$ denote the neutral element. The map
$$
\begin{matrix}
\Lambda[G] & \longrightarrow & \Lambda^{\natural}\\
\sum \lambda_g\cdot g & \longmapsto & \lambda_e
\end{matrix}
$$
factors through $\Lambda[G]^\natural$. We denote
$\varepsilon : \Lambda[G]^\natural\to \Lambda^\natural$ the induced map.
\end{lemma}

\begin{proof}
We have to show the map annihilates commutators. One has
$$
\left(\sum\lambda_g g\right)\left(\sum\mu_g g\right)-\left(\sum \mu_g
g\right)\left(\sum\lambda_g g\right)
= \sum_g\left(\sum_{g_1g_2=g}
\lambda_{g_1}\mu_{g_2}-\mu_{g_1}\lambda_{g_2}\right)g
$$
The coefficient of $e$ is
$$
\sum_g\left(\lambda_g\mu_{g^{-1}}-\mu_g\lambda_{g^{-1}}\right) =
\sum_g\left(\lambda_g\mu_{g^{-1}}-\mu_{g^{-1}}\lambda_g\right)
$$
which is a sum of commutators, hence it zero in $\Lambda^\natural$.
\end{proof}

\begin{definition}
\label{definition-trace-G}
Let $f : P\to P$ be an
endomorphism of a finite projective $\Lambda[G]$-module
$P$. We define
$$
\text{Tr}_{\Lambda}^G(f; P) := \varepsilon\left(\text{Tr}_{\Lambda[G]}(f;
P)\right)
$$
to be the {\it $G$-trace of $f$ on $P$}.
\end{definition}

\begin{lemma}
\label{lemma-lambda-trace}
Let $f : P\to P$ be an endomorphism of the finite projective
$\Lambda[G]$-module $P$. Then
$$
\text{Tr}_{\Lambda}(f; P) = \# G \cdot \text{Tr}_\Lambda^G(f; P).
$$
\end{lemma}

\begin{proof}
By additivity, reduce to the case $P = \Lambda[G]$.
In that case, $f$ is given by
right multiplication by some element $\sum\lambda_g\cdot g$ of $\Lambda[G]$. In
the basis $(g)_{g \in G}$, the matrix of $f$ has coefficient
$\lambda_{g_2^{-1}g_1}$ in the $(g_1, g_2)$ position. In particular, all
diagonal coefficients are $\lambda_e$, and there are $\# G$ such coefficients.
\end{proof}

\begin{lemma}
\label{lemma-A-module-structure}
The map $A\to \Lambda$ defines an $A$-module structure on $\Lambda^\natural$.
\end{lemma}

\begin{proof}
This is clear.
\end{proof}

\begin{lemma}
\label{lemma-diagonal-action-projective-module}
Let $P$ be a finite projective $A[G]$-module and $M$ a $\Lambda[G]$-module,
finite projective as a $\Lambda$-module. Then $P \otimes_A M$ is a finite
projective $\Lambda[G]$-module, for the structure induced by the diagonal
action of $G$.
\end{lemma}

\noindent
Note that $P \otimes_A M$ is naturally a $\Lambda$-module since $M$ is.
Explicitly, together with the diagonal action this reads
$$
\left(\sum\lambda_g g\right)\left(p \otimes m\right)
=
\sum g p \otimes \lambda_g g m.
$$

\begin{proof}
For any $\Lambda[G]$-module $N$ one has
$$
\Hom_{\Lambda[G]}\left(P \otimes_A M, N\right)= \Hom_{A[G]}\left(P,
\Hom_{\Lambda}(M, N)\right)
$$
where the $G$-action on $\Hom_{\Lambda}(M, N)$ is given by $(g\cdot
\varphi)(m) = g \varphi (g^{-1} m) $. Now it suffices to observe that the
right-hand side is a composition of exact functors, because of the projectivity
of $P$ and $M$.
\end{proof}

\begin{lemma}
\label{lemma-multiplicative-trace}
With assumptions as in
Lemma \ref{lemma-diagonal-action-projective-module},
let
$u\in \text{End}_{A[G]}(P)$ and $v\in \text{End}_{\Lambda[G]}(M)$. Then
$$
\text{Tr}_\Lambda^G \left(u \otimes v; P \otimes_A M\right) = \text{Tr}_A^G(u;
P)\cdot \text{Tr}_\Lambda(v;M).
$$
\end{lemma}

\begin{proof}[Sketch of proof]
Reduce to the case $P=A[G]$. In that case, $u$ is right multiplication by some
element $a = \sum a_gg$ of $A[G]$, which we write $u = R_a$. There is an
isomorphism of $\Lambda[G]$-modules
$$
\begin{matrix}
\varphi : & A[G]\otimes_A M & \cong & \left(A[G]\otimes_A M\right)'\\
& g \otimes m & \longmapsto & g \otimes g^{-1}m
\end{matrix}
$$
where $\left(A[G]\otimes_A M\right)'$ has the module structure given by the
left $G$-action, together with the $\Lambda$-linearity on $M$. This transport
of structure changes $u \otimes v$ into $\sum_ga_gR_g \otimes g^{-1}v$. In other
words,
$$
\varphi \circ (u \otimes v) \circ \varphi^{-1}
=
\sum_ga_gR_g \otimes g^{-1}v.
$$
Working out explicitly both sides of the equation, we have to show
$$
\text{Tr}_\Lambda^G\left(\sum_g a_gR_g \otimes g^{-1}v\right) = a_e\cdot
\text{Tr}_\Lambda(v; M).
$$
This is done by showing that
$$
\text{Tr}_\Lambda^G\left(a_gR_g \otimes g^{-1}v\right) =
\left\{
\begin{matrix}
0 & \text{ if } g\neq e\\
a_e\text{Tr}_\Lambda\left(v; M\right) & \text{ if }g = e
\end{matrix}
\right.
$$
by reducing to $M=\Lambda$.
\end{proof}

\noindent
Notation:
Consider the monoid extension $1 \to G\to \Gamma\to \mathbf{N} \to 1$ and let
$\gamma\in \Gamma$.
Then we write $Z_\gamma = \{g\in G | g\gamma = \gamma g\}$.

\begin{lemma}
\label{lemma-gamma-z-gamma-trace}
Let $P$ be a $\Lambda[\Gamma]$-module, finite and projective as a
$\Lambda[G]$-module, and $\gamma \in \Gamma$. Then
$$
\text{Tr}_{\Lambda}(\gamma, P) =
\# Z_\gamma \cdot \text{Tr}_\Lambda^{Z_\gamma}\left(\gamma, P\right).
$$
\end{lemma}

\begin{proof}
This follows readily from Lemma \ref{lemma-lambda-trace}.
\end{proof}

\begin{lemma}
\label{lemma-weak-trace}
Let $P$ be an $A[\Gamma]$-module, finite projective as $A[G]$-module. Let $M$
be a $\Lambda[\Gamma]$-module, finite projective as a $\Lambda$-module. Then
$$
\text{Tr}_{\Lambda}^{Z_\gamma}(\gamma, P \otimes_A M) =
\text{Tr}_A^{Z_\gamma}(\gamma, P)\cdot \text{Tr}_\Lambda(\gamma, M).
$$
\end{lemma}

\begin{proof}
This follows directly from Lemma \ref{lemma-multiplicative-trace}.
\end{proof}

\begin{lemma}
\label{lemma-trivial-trace}
Let $P$ be a $\Lambda[\Gamma]$-module, finite projective as
$\Lambda[G]$-module. Then the coinvariants
$P_G = \Lambda \otimes_{\Lambda[G]} P$
form a finite projective $\Lambda$-module, endowed with an action of
$\Gamma/G = \mathbf{N}$. Moreover, we have
$$
\text{Tr}_\Lambda(1; P_G) =
\sum\nolimits'_{\gamma \mapsto 1} \text{Tr}_\Lambda^{Z_\gamma}(\gamma, P)
$$
where $\sum_{\gamma\mapsto 1}'$ means taking the sum over the $G$-conjugacy
classes in $\Gamma$.
\end{lemma}

\begin{proof}[Sketch of proof]
We first prove this after multiplying by $\# G$.
$$
\# G\cdot \text{Tr}_\Lambda(1; P_G)
= \text{Tr}_\Lambda(\sum\nolimits_{\gamma\mapsto 1} \gamma, P_G)
= \text{Tr}_\Lambda(\sum\nolimits_{\gamma\mapsto 1} \gamma, P)
$$
where the second equality follows by considering the commutative triangle
$$
\xymatrix{
P^G \ar[rd]_a & & P_G \ar[ll]^c \\
& P \ar[ur]_b
}
$$
where $a$ is the canonical inclusion, $b$ the canonical surjection and $c =
\sum_{\gamma \mapsto 1} \gamma$. Then we have
$$
(\sum\nolimits_{\gamma \mapsto 1} \gamma) |_P = a \circ c \circ b
\quad\text{and}\quad
(\sum\nolimits_{\gamma \mapsto 1} \gamma) |_{P_G} = b \circ a \circ c
$$
hence they have the same trace. We then have
$$
\# G\cdot \text{Tr}_\Lambda(1; P_G)
=
{\sum_{\gamma\mapsto 1}}'
\frac{\# G}{\# Z_\gamma}\text{Tr}_\Lambda(\gamma, P)
= \# G{\sum_{\gamma\mapsto 1}}' \text{Tr}_\Lambda^{Z_\gamma}(\gamma, P).
$$
To finish the proof, reduce to case $\Lambda$ torsion-free by some universality
argument. See \cite{SGA4.5} for details.
\end{proof}

\begin{remark}
\label{remark-content-trivial-trace}
Let us try to illustrate the content of the formula of
Lemma \ref{lemma-weak-trace}.
Suppose that $\Lambda$, viewed as a trivial $\Gamma$-module, admits a finite
resolution
$
0\to P_r\to \ldots \to P_1 \to P_0\to \Lambda\to 0
$
by some $\Lambda[\Gamma]$-modules $P_i$ which are finite and projective as
$\Lambda[G]$-modules. In that case
$$
H_*\left(\left(P_\bullet\right)_G\right) =
\text{Tor}_*^{\Lambda[G]}\left(\Lambda, \Lambda\right) = H_*(G, \Lambda)
$$
and
$$
\text{Tr}_\Lambda^{Z_\gamma}\left(\gamma, P_\bullet\right) =\frac{1}{\#
Z_\gamma}\text{Tr}_\Lambda(\gamma, P_\bullet)=\frac{1}{\#
Z_\gamma}\text{Tr}(\gamma, \Lambda) = \frac{1}{\# Z_\gamma}.
$$
Therefore, Lemma \ref{lemma-weak-trace} says
$$
\text{Tr}_\Lambda (1 , P_G)
= \text{Tr}\left(1 |_{H_*(G, \Lambda)}\right)
= {\sum_{\gamma\mapsto 1}}'\frac{1}{\# Z_\gamma}.
$$
This can be interpreted as a point count on the stack $BG$. If
$\Lambda = \mathbf{F}_\ell$ with $\ell$ prime to $\# G$, then
$H_*(G, \Lambda)$ is $\mathbf{F}_\ell$ in degree 0 (and $0$ in
other degrees) and the formula reads
$$
1 =
\sum\nolimits_{
\frac{\sigma\text{-conjugacy}}{\text{classes}\langle\gamma\rangle}
}
\frac{1}{\# Z_\gamma} \mod \ell.
$$
This is in some sense a ``trivial'' trace formula for $G$.
Later we will see that (\ref{equation-trace-formula}) can in
some cases be viewed as a highly nontrivial trace formula for a
certain type of group, see
Section \ref{section-abstract-trace-formula}.
\end{remark}





%11.12.09
\section{Proof of the trace formula}
\label{section-proof-trace-formula}

\begin{theorem}
\label{theorem-trace-formula-again}
Let $k$ be a finite field and $X$ a finite type, separated scheme of dimension
at most 1 over $k$. Let $\Lambda$ be a finite ring whose cardinality is prime
to that of $k$, and $K\in D_{ctf}(X, \Lambda)$. Then
\begin{equation}
\label{equation-trace-formula-again}
\text{Tr}(\pi_X^* |_{R\Gamma_c(X_{\bar k}, K)})
=
\sum\nolimits_{x\in X(k)}
\text{Tr}(\pi_x |_{K_{\bar x}})
\end{equation}
in $\Lambda^{\natural}$.
\end{theorem}

\noindent
Please see Remark \ref{remark-on-trace-formula-again} for some remarks
on the statement. Notation: For short, we write
$$
T'(X, K) =
\sum\nolimits_{x\in X(k)}
\text{Tr}(\pi_x |_{K_{\bar x}})
$$
for the right-hand side of (\ref{equation-trace-formula-again}) and
$$
T''(X, K)
=\text{Tr}(\pi_x^* |_{R\Gamma_c(X_{\bar k}, K)})
$$
for the left-hand side.

\begin{proof}[Proof of Theorem \ref{theorem-trace-formula-again}]
The proof proceeds in a number of steps.

\medskip\noindent
Step 1. {\it Let $j : \mathcal{U}\hookrightarrow X$ be an open immersion with
complement $Y = X - \mathcal{U}$ and $i : Y \hookrightarrow X$. Then
$T''(X, K) = T''(\mathcal{U}, j^{-1} K)+ T''(Y, i^{-1}K)$ and
$T'(X, K) = T'(\mathcal{U}, j^{-1} K)+ T'(Y, i^{-1}K)$.}

\medskip\noindent
This is clear for $T'$. For $T''$ use the exact sequence
$$
0\to j_!j^{-1} K \to K \to i_* i^{-1} K \to 0
$$
to get a filtration on $K$. This gives rise to an object
$\widetilde K \in DF(X, \Lambda)$
whose graded pieces are $j_!j^{-1}K$ and $i_*i^{-1}K$,
both of which lie in $D_{ctf}(X, \Lambda)$. Then, by filtered derived
abstract nonsense (INSERT REFERENCE),
$R\Gamma_c(X_{\bar k}, K)\in DF_{perf}(\Lambda)$,
and it comes equipped with $\pi_x^*$ in
$DF_{perf}(\Lambda)$.
By the discussion of traces on filtered complexes (INSERT REFERENCE) we get
\begin{eqnarray*}
\text{Tr}(\pi_X^* |_{R\Gamma_c(X_{\bar k}, K)})
& = & \text{Tr}(\pi_X^* |_{R\Gamma_c(X_{\bar k}, j_!j^{-1}K)}) +
\text{Tr}(\pi_X^* |_{R\Gamma_c(X_{\bar k}, i_*i^{-1}K)}) \\
& = & T''(U, i^{-1}K) + T''(Y, i^{-1}K).
\end{eqnarray*}

\noindent
Step 2. {\it The theorem holds if $\dim X\leq 0$. }

\medskip\noindent
Indeed, in that case
$$
R\Gamma_c(X_{\bar k}, K) = R\Gamma(X_{\bar k}, K) = \Gamma(X_{\bar k}, K) =
\bigoplus\nolimits_{\bar x\in X_{\bar k}} K_{\bar x} \leftarrow \pi_X*.
$$
Since the fixed points of $\pi_X: X_{\bar k}\to X_{\bar k}$ are exactly the
points $\bar x\in X_{\bar k}$ which lie over a $k$-rational point $x\in X(k)$
we get
$$
\text{Tr}\big(\pi_X^*|_{R\Gamma_c(X_{\bar k}, K)}\big) =
\sum\nolimits_{x\in X(k)}\text{Tr}(\pi_{\bar x}|_{K_{\bar x}}).
$$

\medskip\noindent
Step 3. {\it It suffices to prove the equality
$T'(\mathcal{U}, \mathcal{F}) = T''(\mathcal{U}, \mathcal{F})$
in the case where
\begin{itemize}
\item $\mathcal{U}$ is a smooth irreducible affine curve over $k$,
\item $\mathcal{U}(k) = \emptyset$,
\item $K=\mathcal{F}$ is a finite locally constant sheaf of $\Lambda$-modules
on $\mathcal{U}$ whose stalk(s) are finite projective $\Lambda$-modules, and
\item $\Lambda$ is killed by a power of a prime $\ell$ and $\ell \in k^*$.
\end{itemize}
}

\medskip\noindent
Indeed, because of Step 2, we can throw out any finite set of points. But we
have only finitely many rational points, so we may assume there are
none\footnote{At this point, there should be an evil laugh in the background.}.
We may assume that $\mathcal{U}$ is smooth irreducible and affine by passing to
irreducible components and throwing away the bad points if necessary. The
assumptions of $\mathcal{F}$ come from unwinding the definition of
$D_{ctf}(X, \Lambda)$ and those on $\Lambda$ from considering its primary
decomposition.

\medskip\noindent
For the remainder of the proof, we consider the situation
$$
\xymatrix{
\mathcal{V} \ar[d]_f \ar[r] & Y \ar[d]^{\bar f} \\
\mathcal{U} \ar[r] & X
}
$$
where $\mathcal{U}$ is as above, $f$ is a finite \'etale Galois covering,
$\mathcal{V}$ is connected and the horizontal arrows are projective
completions. Denoting $G=\text{Aut}(\mathcal{V}|\mathcal{U})$, we also assume
(as we may) that $f^{-1}\mathcal{F} =\underline M$ is constant, where the
module $M = \Gamma(\mathcal{V}, f^{-1}\mathcal{F})$ is a $\Lambda[G]$-module
which is finite and projective over $\Lambda$. This corresponds to the trivial
monoid extension
$$
1\to G\to \Gamma = G \times \mathbf{N}\to \mathbf{N}\to 1.
$$
In that context, using the reductions above, we need to show that
$T''(\mathcal{U}, \mathcal{F}) = 0$.

\medskip\noindent
Step 4. {\it There is a natural action of $G$ on $f_*f^{-1}\mathcal{F}$ and
the trace map $f_*f^{-1}\mathcal{F}\to \mathcal{F}$ defines an isomorphism}
$$
(f_*f^{-1}\mathcal{F})\otimes_{\Lambda[G]} \Lambda =
(f_*f^{-1}\mathcal{F})_G \cong \mathcal{F}.
$$

\medskip\noindent
To prove this, simply unwind everything at a geometric point.

\medskip\noindent
Step 5. {\it Let $A = \mathbf{Z}/\ell^n \mathbf{Z}$ with $n\gg 0$. Then
$f_*f^{-1}\mathcal{F} \cong (f_*\underline A)
\otimes_{\underline A} \underline M$ with diagonal $G$-action.}

\medskip\noindent
Step 6. {\it There is a canonical isomorphism
$(f_*\underline A \otimes_{\underline A} \underline M)
\otimes_{\Lambda[G]} \underline \Lambda \cong \mathcal{F}$.
}

\medskip\noindent
In fact, this is a derived tensor product, because of the projectivity
assumption on $\mathcal{F}$.

\medskip\noindent
Step 7. {\it There is a canonical isomorphism
$$
R\Gamma_c(\mathcal{U}_{\bar k}, \mathcal{F})
= (R\Gamma_c(\mathcal{U}_{\bar k}, f_*A)\otimes_A^\mathbf{L}
M)\otimes_{\Lambda[G]}^\mathbf{L} \Lambda,
$$
compatible with the action of $\pi^*_\mathcal{U}$.
}

\medskip\noindent
This comes from the universal coefficient theorem, i.e., the fact that
$R\Gamma_c$ commutes with $\otimes^\mathbf{L}$, and the flatness of
$\mathcal{F}$ as a $\Lambda$-module.

\medskip\noindent
We have
\begin{eqnarray*}
\text{Tr}(
\pi_\mathcal{U}^* |_{R\Gamma_c(\mathcal{U}_{\bar k}, \mathcal{F})})
& = &
{\sum_{g \in G}}'
\text{Tr}_{\Lambda}^{Z_g}
\left(
(g, \pi_\mathcal{U}^*)
|_{R\Gamma_c(\mathcal{U}_{\bar k}, f_*A)\otimes_A^\mathbf{L} M}
\right) \\
& = &
{\sum_{g\in G}}'
\text{Tr}_A^{Z_g}
(
(g, \pi_\mathcal{U}^*) |_{R\Gamma_c(\mathcal{U}_{\bar k}, f_*A)}
)
\cdot
\text{Tr}_\Lambda(g|_M)
\end{eqnarray*}
where $\Gamma$ acts on $R\Gamma_c(\mathcal{U}_{\bar k}, \mathcal{F})$ by $G$
and $(e, 1)$ acts via $\pi_\mathcal{U}^*$. So the monoidal extension is given
by $\Gamma = G \times \mathbf{N} \to \mathbf{N}$, $\gamma \mapsto 1$. The first
equality follows from Lemma \ref{lemma-trivial-trace} and the second from
Lemma \ref{lemma-weak-trace}.

\medskip\noindent
Step 8. {\it It suffices to show that
$\text{Tr}_A^{Z_g}((g, \pi_\mathcal{U}^*)
|_{R\Gamma_c(\mathcal{U}_{\bar k}, f_*A)}) \in A$
maps to zero in $\Lambda$.
}

\medskip\noindent
Recall that
\begin{eqnarray*}
\# Z_g \cdot \text{Tr}_A^{Z_g}((g, \pi_\mathcal{U}^*)
|_{R\Gamma_c(\mathcal{U}_{\bar k}, f_*A)})
& = & \text{Tr}_A((g, \pi_\mathcal{U}^*)
|_{R\Gamma_c(\mathcal{U}_{\bar k}, f_*A)})\\
& = &
\text{Tr}_A((g^{-1}\pi_\mathcal{V})^* |_{R\Gamma_c(\mathcal{V}_{\bar k}, A)}).
\end{eqnarray*}
The first equality is
Lemma \ref{lemma-gamma-z-gamma-trace},
the second is the Leray
spectral sequence, using the finiteness of $f$ and the fact that we are only
taking traces over $A$. Now since $A=\mathbf{Z}/\ell^n\mathbf{Z}$ with
$n \gg 0$ and $\# Z_g = \ell^a$ for some (fixed) $a$,
it suffices to show the following result.

\medskip\noindent
Step 9. {\it We have
$\text{Tr}_A((g^{-1}\pi_\mathcal{V})^* |_{R\Gamma_c(\mathcal{V}, A)}) = 0$
in $A$.}

\medskip\noindent
By additivity again, we have
\begin{eqnarray*}
& \text{Tr}_A((g^{-1}\pi_\mathcal{V})^* |_{R\Gamma_c(\mathcal{V}_{\bar k} A)})
+
\text{Tr}_A((g^{-1}\pi_\mathcal{V})^*
|_{R\Gamma_c(Y-\mathcal {V})_{\bar k}, A)}) \\
& =
\text{Tr}_A((g^{-1}\pi_Y)^* |_{R\Gamma(Y_{\bar k}, A)})
\end{eqnarray*}
The latter trace is the number of fixed points of $g^{-1}\pi_Y$ on $Y$, by
Weil's trace formula
Theorem \ref{theorem-weil-trace-formula}.
Moreover, by the 0-dimensional case already proven in step 2,
$$
\text{Tr}_A((g^{-1}\pi_\mathcal{V})^*|_{R\Gamma_c(Y-\mathcal{V})_{\bar k}, A)})
$$
is the number of fixed points of $g^{-1}\pi_Y$ on $(Y-\mathcal{V})_{\bar k}$.
Therefore,
$$
\text{Tr}_A((g^{-1}\pi_\mathcal{V})^* |_{R\Gamma_c(\mathcal{V}_{\bar k}, A)})
$$
is the number of fixed points of $g^{-1}\pi_Y$ on $\mathcal{V}_{\bar k}$. But
there are no such points: if $\bar y\in Y_{\bar k}$ is fixed under
$g^{-1}\pi_Y$, then $\bar f(\bar y) \in X_{\bar k}$ is fixed under $\pi_X$. But
$\mathcal{U}$ has no $k$-rational point, so we must have $\bar f(\bar y)\in
(X-\mathcal{U})_{\bar k}$ and so $\bar y\notin \mathcal{V}_{\bar k}$, a
contradiction.
This finishes the proof.
\end{proof}

\begin{remark}
\label{remark-on-trace-formula-again}
Remarks on Theorem \ref{theorem-trace-formula-again}.
\begin{enumerate}
\item
This formula holds in any dimension. By a d\'evissage lemma (which uses proper
base change etc.) it reduces to the current statement -- in that generality.
\item
The complex $R\Gamma_c(X_{\bar k}, K)$ is defined by choosing an open immersion
$j : X \hookrightarrow \bar X$ with $\bar X$ projective over $k$ of dimension at
most 1 and setting
$$
R\Gamma_c(X_{\bar k}, K) := R\Gamma(\bar X_{\bar k}, j_!K).
$$
This is independent of the choice of $\bar X$ follows from
(insert reference here). We define $H^i_c(X_{\bar k}, K)$
to be the $i$th cohomology group of $R\Gamma_c(X_{\bar k}, K)$.
\end{enumerate}
\end{remark}

\begin{remark}
\label{remark-stronger}
Even though all we did are reductions and mostly algebra, the trace formula
Theorem \ref{theorem-trace-formula-again} is much stronger than
Weil's geometric trace formula (Theorem \ref{theorem-weil-trace-formula})
because it applies to coefficient
systems (sheaves), not merely constant coefficients.
\end{remark}


%11.17.09
\section{Applications}
\label{section-applications}

\noindent
OK, having indicated the proof of the trace formula, let's try to use it
for something.





\section{On l-adic sheaves}
\label{section-l-adic-sheaves}

\begin{definition}
\label{definition-l-adic-sheaf}
Let $X$ be a Noetherian scheme. A {\it $\mathbf{Z}_\ell$-sheaf} on $X$, or
simply an {\it $\ell$-adic sheaf} $\mathcal{F}$ is an
inverse system $\left\{\mathcal{F}_n\right\}_{n\geq 1}$ where
\begin{enumerate}
\item
$\mathcal{F}_n$ is a constructible $\mathbf{Z}/\ell^n\mathbf{Z}$-module on
$X_\etale$, and
\item
the transition maps $\mathcal{F}_{n+1}\to \mathcal{F}_n$ induce isomorphisms
$\mathcal{F}_{n+1} \otimes_{\mathbf{Z}/\ell^{n+1}\mathbf{Z}}
\mathbf{Z}/\ell^n\mathbf{Z} \cong \mathcal{F}_n$.
\end{enumerate}
We say that $\mathcal{F}$ is {\it lisse} if each $\mathcal{F}_n$ is locally
constant. A {\it morphism} of such is merely a morphism of inverse systems.
\end{definition}

\begin{lemma}
\label{lemma-eventually-constant}
Let $\{\mathcal{G}_n\}_{n\geq 1}$ be an inverse system of constructible
$\mathbf{Z}/\ell^n\mathbf{Z}$-modules.
Suppose that for all $k\geq 1$, the maps
$$
\mathcal{G}_{n+1}/\ell^k \mathcal{G}_{n+1}\to \mathcal{G}_n /\ell^k
\mathcal{G}_n
$$
are isomorphisms for all $n\gg 0$ (where the bound possibly depends on $k$).
In other words, assume that the system
$\{\mathcal{G}_n/\ell^k\mathcal{G}_n\}_{n\geq 1}$
is eventually constant, and call $\mathcal{F}_k$ the corresponding sheaf.
Then the system $\left\{\mathcal{F}_k\right\}_{k\geq 1}$ forms a
$\mathbf{Z}_\ell$-sheaf on $X$.
\end{lemma}

\begin{proof}
The proof is obvious.
\end{proof}

\begin{lemma}
\label{lemma-l-adic-abelian}
The category of $\mathbf{Z}_\ell$-sheaves on $X$ is abelian.
\end{lemma}

\begin{proof}
Let
$\Phi = \left\{\varphi_n\right\}_{n\geq 1} :
\left\{\mathcal{F}_n\right\}
\to
\left\{\mathcal{G}_n\right\}$
be a morphism of $\mathbf{Z}_\ell$-sheaves. Set
$$
\Coker(\Phi) =
\left\{
\Coker\left(\mathcal{F}_n \xrightarrow{\varphi_n} \mathcal{G}_n\right)
\right\}_{n\geq 1}
$$
and $\Ker(\Phi)$ is the result of
Lemma \ref{lemma-eventually-constant}
applied to the inverse system
$$
\left\{
\bigcap_{m\geq n}
\Im\left(\Ker(\varphi_m) \to \Ker(\varphi_n)\right)
\right\}_{n \geq 1}.
$$
That this defines an abelian category is left to the reader.
\end{proof}

\begin{example}
\label{example-kernel}
Let $X=\Spec(\mathbf{C})$ and $\Phi : \mathbf{Z}_\ell\to \mathbf{Z}_\ell$
be multiplication by $\ell$. More precisely,
$$
\Phi = \left\{ \mathbf{Z}/\ell^n\mathbf{Z} \xrightarrow{\ell}
\mathbf{Z}/\ell^n\mathbf{Z}\right\}_{n \geq 1}.
$$
To compute the kernel, we consider the inverse system
$$
\ldots\to \mathbf{Z}/\ell\mathbf{Z}\xrightarrow{0}
\mathbf{Z}/\ell\mathbf{Z}\xrightarrow{0}\mathbf{Z}/\ell\mathbf{Z}.
$$
Since the images are always zero, $\Ker(\Phi)$ is zero as a system.
\end{example}

\begin{remark}
\label{remark-stalk-l-adic-sheaf}
If $\mathcal{F} = \left\{\mathcal{F}_n\right\}_{n\geq 1}$ is a
$\mathbf{Z}_\ell$-sheaf on $X$ and $\bar x$ is a geometric point then
$M_n = \left\{\mathcal{F}_{n, \bar x}\right\}$ is an inverse system of finite
$\mathbf{Z}/\ell^n\mathbf{Z}$-modules such that $M_{n+1}\to M_n$ is surjective
and $M_n = M_{n+1}/\ell^n M_{n+1}$. It follows that
$$
M = \lim_n M_n = \lim \mathcal{F}_{n, \bar x}
$$
is a finite $\mathbf{Z}_\ell$-module. Indeed, $M/\ell M= M_1$ is finite over
$\mathbf{F}_\ell$, so by Nakayama $M$ is finite over $\mathbf{Z}_\ell$.
Therefore, $M\cong \mathbf{Z}_\ell^{\oplus r} \oplus \oplus_{i = 1}^t
\mathbf{Z}_\ell/\ell^{e_i}\mathbf{Z}_\ell$ for some $r, t\geq 0$, $e_i\geq 1$.
The module $M = \mathcal{F}_{\bar x}$ is called the {\it stalk} of
$\mathcal{F}$ at $\bar x$.
\end{remark}

\begin{definition}
\label{definition-torsion-l-adic-sheaf}
A $\mathbf{Z}_\ell$-sheaf $\mathcal{F}$ is {\it torsion} if
$\ell^n : \mathcal{F} \to \mathcal{F}$ is the zero map for some $n$.
The abelian category
of $\mathbf{Q}_\ell$-sheaves on $X$ is the quotient of the abelian category of
$\mathbf{Z}_\ell$-sheaves by the Serre subcategory of torsion sheaves. In
other words, its objects are $\mathbf{Z}_\ell$-sheaves on $X$, and if
$\mathcal{F}, \mathcal{G}$ are two such, then
$$
\Hom_{\mathbf{Q}_\ell} \left(\mathcal{F}, \mathcal{G} \right) =
\Hom_{\mathbf{Z}_\ell} \left(\mathcal{F}, \mathcal{G}\right)
\otimes_{\mathbf{Z}_\ell} \mathbf{Q}_\ell.
$$
We denote by $\mathcal{F} \mapsto \mathcal{F} \otimes \mathbf{Q}_\ell$ the
quotient functor (right adjoint to the inclusion). If $\mathcal{F} =
\mathcal{F}' \otimes \mathbf{Q}_\ell$ where $\mathcal{F}'$ is a
$\mathbf{Z}_\ell$-sheaf and $\bar x$ is a geometric point, then the
{\it stalk} of $\mathcal{F}$ at $\bar x$ is $\mathcal{F}_{\bar x} =
\mathcal{F}'_{\bar x} \otimes \mathbf{Q}_\ell$.
\end{definition}

\begin{remark}
\label{remark-torsion-stalks}
Since a $\mathbf{Z}_\ell$-sheaf is only defined on a Noetherian scheme, it is
torsion if and only if its stalks are torsion.
\end{remark}

\begin{definition}
\label{definition-cohomology-l-adic}
If $X$ is a separated scheme of finite type over an algebraically closed field
$k$ and $\mathcal{F} = \left\{\mathcal{F}_n\right\}_{n\geq 1}$ is a
$\mathbf{Z}_\ell$-sheaf on $X$, then we define
$$
H^i(X, \mathcal{F}) := \lim_n H^i(X, \mathcal{F}_n)
\quad\text{and}\quad
H_c^i(X, \mathcal{F}) := \lim_n H_c^i(X, \mathcal{F}_n).
$$
If $\mathcal{F} = \mathcal{F}'\otimes \mathbf{Q}_\ell$ for a
$\mathbf{Z}_\ell$-sheaf $\mathcal{F}'$ then we set
$$
H_c^i(X , \mathcal{F}) := H_c^i(X,
\mathcal{F}')\otimes_{\mathbf{Z}_\ell}\mathbf{Q}_\ell.
$$
We call these the {\it $\ell$-adic cohomology} of $X$ with coefficients
$\mathcal{F}$.
\end{definition}





\section{L-functions}
\label{section-L-function}

\begin{definition}
\label{definition-L-function-finite-ring}
Let $X$ be a scheme of finite type over a finite field $k$. Let $\Lambda$ be a
finite ring of order prime to the characteristic of $k$ and $\mathcal{F}$ a
constructible flat $\Lambda$-module on $X_\etale$. Then we set
$$
L(X, \mathcal{F}) :=
\prod\nolimits_{x\in |X|}
\det(1 - \pi_x^*T^{\deg x} |_{\mathcal{F}_{\bar x}})^{-1} \in \Lambda [[ T ]]
$$
where $|X|$ is the set of closed points of $X$, $\deg x = [\kappa(x): k]$ and
$\bar x$ is a geometric point lying over $x$. This definition clearly
generalizes to the case where $\mathcal{F}$ is replaced by a
$K \in D_{ctf}(X, \Lambda)$. We call this the {\it $L$-function of
$\mathcal{F}$}.
\end{definition}

\begin{remark}
\label{remark-T}
Intuitively, $T$ should be thought of as $T = t^f$ where $p^f = \# k$. The
definitions are then independent of the size of the ground field.
\end{remark}

\begin{definition}
\label{definition-L-function-l-adic}
Now assume that $\mathcal{F}$ is a $\mathbf{Q}_\ell$-sheaf on $X$.
In this case we define
$$
L(X, \mathcal{F}) :=
\prod\nolimits_{x \in |X|}
\det(1 - \pi_x^*T^{\deg x} |_{\mathcal{F}_{\bar x}})^{-1}
\in \mathbf{Q}_\ell[[T]].
$$
Note that this product converges since there are finitely many points of a
given degree. We call this the {\it $L$-function of
$\mathcal{F}$}.
\end{definition}




\section{Cohomological interpretation}
\label{section-L-cohomological}

\noindent
This is how Grothendieck interpreted the $L$-function.

\begin{theorem}[Finite Coefficients]
\label{theorem-A}
Let $X$ be a scheme of finite type over a finite field $k$. Let $\Lambda$ be a
finite ring of order prime to the characteristic of $k$ and $\mathcal{F}$ a
constructible flat $\Lambda$-module on $X_\etale$. Then
$$
L(X, \mathcal{F}) =
\det(1 - \pi_X^*\ T |_{R\Gamma_c(X_{\bar k}, \mathcal{F})})^{-1}
\in \Lambda[[T]].
$$
\end{theorem}

\begin{proof}
Omitted.
\end{proof}

\noindent
Thus far, we don't even know whether each cohomology group
$H^i_c(X_{\bar k}, \mathcal{F})$ is free.

\begin{theorem}[Adic sheaves]
\label{theorem-B}
Let $X$ be a scheme of finite type over a finite field $k$, and $\mathcal{F}$ a
$\mathbf{Q}_\ell$-sheaf on $X$. Then
$$
L(X, \mathcal{F}) =
\prod\nolimits_i
\det(1 - \pi_X^*T |_{H_c^i(X_{\bar k} , \mathcal{F})})^{(-1)^{i + 1}}
\in \mathbf{Q}_\ell[[T]].
$$
\end{theorem}

\begin{proof}
This is sketched below.
\end{proof}

\begin{remark}
\label{remark-which-is-harder}
Since we have only developed some theory of traces and not of determinants,
Theorem \ref{theorem-A}
is harder to prove than
Theorem \ref{theorem-B}.
We will only prove the latter, for the former see \cite{SGA4.5}.
Observe also that there is no version of this theorem more general for
$\mathbf{Z}_\ell$ coefficients since there is no $\ell$-torsion.
\end{remark}

\noindent
We reduce the proof of Theorem \ref{theorem-B} to a trace formula. Since
$\mathbf{Q}_\ell$ has characteristic 0, it suffices to prove the equality after
taking logarithmic derivatives. More precisely, we apply $T\frac{d}{dT} \log$
to both sides. We have on the one hand
\begin{align*}
T \frac{d}{dT} \log L(X, \mathcal{F})
& =
T\frac{d}{dT} \log
\prod_{x \in |X|} \det(1 - \pi_x^* T^{\deg x} |_{\mathcal{F}_{\bar x}})^{-1} \\
& =
\sum_{x \in |X|} T \frac{d}{dT} \log
( \det(1 - \pi_x^* T^{\deg x} |_{\mathcal{F}_{\bar x}})^{-1}) \\
& =
\sum_{x \in |X|} \deg x
\sum_{n \geq 1} \text{Tr}((\pi_x^n)^* |_{\mathcal{F}_{\bar x}}) T^{n\deg x}
\end{align*}
where the last equality results from the formula
$$
T\frac{d}{dT}\log\left(\det\left(1-fT|_M\right)^{-1}\right) = \sum_{n\geq 1}
\text{Tr}(f^n|_M)T^n
$$
which holds for any commutative ring $\Lambda$ and any endomorphism $f$ of a
finite projective $\Lambda$-module $M$. On the other hand, we have
\begin{align*}
& T\frac{d}{dT} \log\left(
\prod\nolimits_i
\det(1-\pi_X^*T |_{H_c^i\left(X_{\bar k} , \mathcal{F}\right)})^{(-1)^{i+1}}
\right) \\
& =
\sum\nolimits_i (-1)^i \sum\nolimits_{n \geq 1}
\text{Tr}\left((\pi_X^n)^* |_{H_c^i(X_{\bar k},\mathcal{F})}\right) T^n
\end{align*}
by the same formula again. Now, comparing powers of $T$ and using the Mobius
inversion formula, we see that Theorem \ref{theorem-B} is a consequence of the
following equality
$$
\sum_{d | n} d \sum_{x \in |X| \atop \deg x = d}
\text{Tr}((\pi_X^{n/d})^* |_{\mathcal{F}_{\bar x}}) =
\sum_i (-1)^i \text{Tr}((\pi^n_X)^* |_{H^i_c(X_{\bar k}, \mathcal{F})}).
$$
Writing $k_n$ for the degree $n$ extension of $k$,
$X_n = X \times_{\Spec k} \Spec(k_n)$ and
$_n\mathcal{F} = \mathcal{F}|_{X_n}$, this boils down
to
$$
\sum_{x \in X_n(k_n)} \text{Tr}(\pi_X^* |_{_n\mathcal{F}_{\bar x}})
=
\sum_i (-1)^i \text{Tr}((\pi^n_X)^* |_{H^i_c({(X_n)}_{\bar k}, _n\mathcal{F})})
$$
which is a consequence of Theorem \ref{theorem-C}.

%11.19.09


\begin{theorem}
\label{theorem-D}
Let $X/k$ be as above, let $\Lambda$ be a finite ring with $\#\Lambda \in k^*$
and $K\in D_{ctf}(X, \Lambda)$. Then $R\Gamma_c(X_{\bar k}, K)\in
D_{perf}(\Lambda)$ and
$$
\sum_{x\in X(k)}\text{Tr}\left(\pi_x |_{K_{\bar x}}\right) =
\text{Tr}\left(\pi_X^* |_{R\Gamma_c(X_{\bar k}, K )}\right).
$$
\end{theorem}

\begin{proof}
Note that we have already proved this (REFERENCE) when $\dim X \leq 1$. The
general case follows easily from that case together with the proper base change
theorem.
\end{proof}

\begin{theorem}
\label{theorem-C}
Let $X$ be a separated scheme of finite type over a finite field $k$ and
$\mathcal{F}$ be a $\mathbf{Q}_\ell$-sheaf on $X$. Then
$\dim_{\mathbf{Q}_\ell}H_c^i(X_{\bar k}, \mathcal{F})$ is finite for all $i$,
and is nonzero for $0\leq i \leq 2 \dim X$ only. Furthermore, we have
$$
\sum_{x\in X(k)} \text{Tr}\left(\pi_x |_{\mathcal{F}_{\bar x}}\right) =
\sum_i (-1)^i\text{Tr}\left(\pi_X^* |_{H_c^i(X_{\bar k}, \mathcal{F})}\right).
$$
\end{theorem}

\begin{proof}
We explain how to deduce this from Theorem \ref{theorem-D}.
We first use some \'etale cohomology arguments to reduce the proof
to an algebraic statement which we subsequently prove.

\medskip\noindent
Let $\mathcal{F}$ be as in the theorem. We can write
$\mathcal{F}$ as
$\mathcal{F}'\otimes \mathbf{Q}_\ell$ where $\mathcal{F}' =
\left\{\mathcal{F}'_n\right\}$ is a $\mathbf{Z}_\ell$-sheaf without torsion,
i.e., $\ell : \mathcal{F}'\to \mathcal{F}'$ has trivial kernel in the
category of $\mathbf{Z}_\ell$-sheaves. Then each $\mathcal{F}_n'$ is a flat
constructible $\mathbf{Z}/\ell^n\mathbf{Z}$-module on $X_\etale$, so
$\mathcal{F}'_n \in D_{ctf}(X, \mathbf{Z}/\ell^n\mathbf{Z})$ and
$\mathcal{F}_{n+1}'
\otimes^{\mathbf{L}}_{\mathbf{Z}/\ell^{n+1}\mathbf{Z}}
\mathbf{Z}/\ell^n\mathbf{Z} = \mathcal{F}_n'$.
Note that the last equality holds also
for standard (non-derived) tensor product, since $\mathcal{F}'_n$ is flat
(it is the same equality). Therefore,
\begin{enumerate}
\item
the complex $K_n = R\Gamma_c\left(X_{\bar k}, \mathcal{F}_n'\right)$ is perfect,
and it is endowed with an endomorphism $\pi_n : K_n\to K_n$ in
$D(\mathbf{Z}/\ell^n\mathbf{Z})$,
\item
there are identifications
$$
K_{n+1}
\otimes^{\mathbf{L}}_{\mathbf{Z}/\ell^{n+1}\mathbf{Z}}
\mathbf{Z}/\ell^n\mathbf{Z}
=
K_n
$$
in $D_{perf}(\mathbf{Z}/\ell^n\mathbf{Z})$, compatible with the endomorphisms
$\pi_{n+1}$ and $\pi_n$ (see \cite[Rapport 4.12]{SGA4.5}),
\item
the equality $\text{Tr}\left(\pi_X^* |_{K_n}\right) =
\sum_{x\in X(k)} \text{Tr}\left(\pi_x |_{(\mathcal{F}'_n)_{\bar x}}\right)$
holds, and
\item
for each $x\in X(k)$, the elements
$\text{Tr}(\pi_x |_{\mathcal{F}'_{n, \bar x}}) \in \mathbf{Z}/\ell^n\mathbf{Z}$
form an element of
$\mathbf{Z}_\ell$ which is equal to
$\text{Tr}(\pi_x |_{\mathcal{F}_{\bar x}}) \in \mathbf{Q}_\ell$.
\end{enumerate}
It thus suffices to prove the following algebra lemma.
\end{proof}

\begin{lemma}
\label{lemma-piece-together}
Suppose we have
$K_n\in D_{perf}(\mathbf{Z}/\ell^n\mathbf{Z})$, $\pi_n : K_n\to K_n$
and isomorphisms
$\varphi_n :
K_{n+1} \otimes^\mathbf{L}_{\mathbf{Z}/\ell^{n+1}\mathbf{Z}}
\mathbf{Z}/\ell^n\mathbf{Z}
\to K_n$
compatible with $\pi_{n+1}$ and $\pi_n$. Then
\begin{enumerate}
\item
the elements $t_n = \text{Tr}(\pi_n |_{K_n})\in \mathbf{Z}/\ell^n\mathbf{Z}$
form an element $t_\infty = \{t_n\}$ of $\mathbf{Z}_\ell$,
\item
the $\mathbf{Z}_\ell$-module $H_\infty^i = \lim_n H^i(k_n)$ is finite and
is nonzero for finitely many $i$ only, and
\item
the operators $H^i(\pi_n): H^i(K_n)\to H^i(K_n)$ are compatible and define
$\pi_\infty^i : H_\infty^i\to H_\infty^i$ satisfying
$$
\sum (-1)^i \text{Tr}(
\pi_\infty^i |_{H_\infty^i \otimes_{\mathbf{Z}_\ell}\mathbf{Q}_\ell}) =
t_\infty.
$$
\end{enumerate}
\end{lemma}

\begin{proof}
Since $\mathbf{Z}/\ell^n\mathbf{Z}$ is a local ring and $K_n$ is perfect, each
$K_n$ can be represented by a finite complex $K_n^\bullet$ of finite free
$\mathbf{Z}/\ell^n \mathbf{Z}$-modules such that the map $K_n^p \to K_n^{p+1}$
has image contained in $\ell K_n^{p+1}$. It is a fact that such a complex is
unique up to isomorphism. Moreover $\pi_n$ can be represented by a morphism of
complexes $\pi_n^\bullet : K_n^\bullet\to K_n^\bullet$ (which is unique up to
homotopy). By the same token the isomorphism
$\varphi_n : K_{n+1} \otimes_{\mathbf{Z}/\ell^{n+1}\mathbf{Z}}^{\mathbf{L}}
\mathbf{Z}/\ell^n\mathbf{Z}\to K_n$ is represented by a map of complexes
$$
\varphi_n^\bullet :
K_{n+1}^\bullet
\otimes_{\mathbf{Z}/\ell^{n+1}\mathbf{Z}}
\mathbf{Z}/\ell^n\mathbf{Z} \to K_n^\bullet.
$$
In fact, $\varphi_n^\bullet$ is an isomorphism of complexes, thus we see that
\begin{itemize}
\item
there exist $a, b\in \mathbf{Z}$ independent of $n$ such that $K_n^i = 0$ for
all $i\notin[a, b]$, and
\item
the rank of $K_n^i$ is independent of $n$.
\end{itemize}
Therefore, the module $K_\infty^i = \lim_n \{K_n^i, \varphi_n^i\}$ is a
finite free $\mathbf{Z}_\ell$-module and $K_\infty^\bullet$ is a finite complex
of finite free $\mathbf{Z}_\ell$-modules. By induction on the number of nonzero
terms, one can prove that $H^i\left(K_\infty^\bullet\right) = \lim_n
H^i\left(K_n^\bullet\right)$ (this is not true for unbounded complexes). We
conclude that $H_\infty^i = H^i\left(K_\infty^\bullet\right)$ is a finite
$\mathbf{Z}_\ell$-module. This proves {\it ii}. To prove the remainder of the
lemma, we need to overcome the possible noncommutativity of the diagrams
$$
\xymatrix{
{K_{n+1}^\bullet} \ar[d]_{\pi_{n+1}^\bullet} \ar[r]^{\varphi_n^\bullet} &
{K_n^\bullet} \ar[d]^{\pi_n^\bullet} \\
{K_{n+1}^\bullet} \ar[r]_{\varphi_n^\bullet} & {K_n^\bullet.}
}
$$
However, this diagram does commute in the derived category, hence it commutes
up to homotopy. We inductively replace $\pi_n^\bullet$ for $n\geq 2$ by
homotopic maps of complexes making these diagrams commute. Namely, if $h^i :
K_{n+1}^i \to K_n^{i-1}$ is a homotopy, i.e.,
$$
\pi_n^\bullet \circ \varphi_n^\bullet -
\varphi_n^\bullet \circ \pi_{n + 1}^\bullet = dh + hd,
$$
then we choose $\tilde h^i : K_{n+1}^i\to K_{n+1}^{i-1}$ lifting $h^i$. This is
possible because $K_{n+1}^i$ free and $K_{n+1}^{i-1}\to K_n^{i-1}$ is
surjective. Then replace $\pi_n^\bullet$ by $\tilde\pi_n^\bullet$ defined by
$$
\tilde\pi_{n+1}^\bullet = \pi_{n+1}^\bullet + d\tilde h+\tilde hd.
$$
With this choice of $\{\pi_n^\bullet\}$, the above diagrams commute, and the
maps fit together to define an endomorphism $\pi_\infty^\bullet =
\lim_n\pi_n^\bullet$ of $K_\infty^\bullet$. Then part {\it i} is clear:
the elements $t_n = \sum(-1)^i \text{Tr}\left(\pi_n^i |_{K_n^i}\right)$
fit into an element $t_\infty$ of $\mathbf{Z}_\ell$. Moreover
\begin{align*}
t_\infty
& =
\sum (-1)^i \text{Tr}_{\mathbf{Z}_\ell}(\pi_\infty^i |_{K_\infty^i}) \\
& =
\sum (-1)^i \text{Tr}_{\mathbf{Q}_\ell}(
\pi_\infty^i |_{K_\infty^i \otimes_{\mathbf{Z}_\ell}\mathbf{Q}_\ell}) \\
& =
\sum (-1)^i \text{Tr}(
\pi_\infty |_{H^i(K_\infty^\bullet \otimes \mathbf{Q}_\ell)})
\end{align*}
where the last equality follows from the fact that $\mathbf{Q}_\ell$ is a
field, so the complex $K_\infty^\bullet \otimes \mathbf{Q}_\ell$ is
quasi-isomorphic to its cohomology
$H^i(K_\infty^\bullet \otimes \mathbf{Q}_\ell)$. The latter is also equal to
$H^i(K_\infty^\bullet)\otimes_{\mathbf{Z}}\mathbf{Q}_\ell = H_\infty^i \otimes
\mathbf{Q}_\ell$, which finishes the proof of the lemma, and also that of
Theorem \ref{theorem-C}.
\end{proof}




\section{List of things which we should add above}
\label{section-list-skipped}

\noindent
What did we skip the proof of in the lectures so far:
\begin{enumerate}
\item curves and their Jacobians,
\item proper base change theorem,
\item inadequate discussion of $R\Gamma_c$,
\item more generally, given $f : X \to S$ finite type,
separated $S$ quasi-projective, discussion of $Rf_!$ on \'etale sheaves.
\item discussion of $\otimes^{\mathbf{L}}$
\item discussion of why $R\Gamma_c$ commutes with $\otimes^{\mathbf{L}}$
\end{enumerate}






%11.24.09
\section{Examples of L-functions}
\label{section-examples-L-functions}

\noindent
We use Theorem \ref{theorem-B} for curves to give examples of $L$-functions





\section{Constant sheaves}
\label{section-L-function-constant-sheaf}

\noindent
Let $k$ be a finite field, $X$ a smooth, geometrically irreducible curve over
$k$ and $\mathcal{F} = \underline{\mathbf{Q}_\ell}$ the constant sheaf. If
$\bar x$ is a geometric point of $X$, the Galois module
$\mathcal{F}_{\bar x} = \mathbf{Q}_\ell$ is trivial, so
$$
\det(1-\pi_x^*\ T^{\deg x} |_{\mathcal{F}_{\bar x}})^{-1} =
\frac{1}{1-T^{\deg x}}.
$$
Applying Theorem \ref{theorem-B}, we get
\begin{align*}
L(X, \mathcal{F})
& =
\prod_{i = 0}^2
\det(1 - \pi_X^*T |_{H_c^i(X_{\bar k}, \mathbf{Q}_\ell)})^{(-1)^{i+1}} \\
& =
\frac{\det(1 - \pi_X^*T |_{H_c^1(X_{\bar k}, \mathbf{Q}_\ell)})}{
\det(1 - \pi_X^*T |_{H_c^0(X_{\bar k}, \mathbf{Q}_\ell)})
\cdot \det(1 - \pi_X^*T |_{H_c^2(X_{\bar k}, \mathbf{Q}_\ell)})}.
\end{align*}
To compute the latter, we distinguish two cases.


\medskip\noindent
{\bf Projective case.}
Assume that $X$ is projective, so $H_c^i(X_{\bar k}, \mathbf{Q}_\ell) =
H^i(X_{\bar k}, \mathbf{Q}_\ell)$, and we have
$$
H^i(X_{\bar k}, \mathbf{Q}_\ell) =
\left\{
\begin{matrix}
\mathbf{Q}_\ell & \pi_X^* = 1 & \text{if }i = 0, \\
\mathbf{Q}_\ell^{2g} & \pi_X^* = ? & \text{if }i = 1, \\
\mathbf{Q}_\ell & \pi_X^* = q & \text{if }i = 2.
\end{matrix}
\right.
$$
The identification of the action of $\pi_X^*$ on $H^2$ comes from
\'Etale Cohomology, Lemma \ref{etale-cohomology-lemma-pullback-on-h2-curve}
and the fact that the degree
of $\pi_X$ is $q = \#(k)$.
We do not know much about the action of $\pi_X^*$ on the degree 1 cohomology.
Let us call $\alpha_1, \ldots, \alpha_{2g}$ its eigenvalues in
$\bar{\mathbf{Q}}_\ell$. Putting everything together,
Theorem \ref{theorem-B}
yields the equality
$$
\prod\nolimits_{x \in |X|} \frac{1}{1 - T^{\deg x}} =
\frac{\det(1- \pi_X^* T|_{H^1(X_{\bar k}, \mathbf{Q}_\ell)})}{(1-T)(1-qT)} =
\frac{(1 - \alpha_1 T) \ldots (1 - \alpha_{2g}T)}{(1-T)(1-qT)}
$$
from which we deduce the following result.

\begin{lemma}
\label{lemma-count-points-projective}
Let $X$ be a smooth, projective, geometrically irreducible
curve over a finite field $k$. Then
\begin{enumerate}
\item the $L$-function $L(X, \mathbf{Q}_\ell)$ is a rational function,
\item the eigenvalues $\alpha_1, \ldots, \alpha_{2g}$ of $\pi_X^*$ on
$H^1(X_{\bar k}, \mathbf{Q}_\ell)$ are algebraic integers
independent of $\ell$,
\item the number of rational points of $X$ on $k_n$, where $[k_n : k] = n$, is
$$
\# X(k_n) = 1 - \sum\nolimits_{i = 1}^{2g}\alpha_i^n + q^n,
$$
\item for each $i$, $|\alpha_i| < q$.
\end{enumerate}
\end{lemma}

\begin{proof}
Part (3) is Theorem \ref{theorem-C} applied to $\mathcal{F} =
\underline{\mathbf{Q}_\ell}$ on $X \otimes k_n$. For part (4), use the
following result.
\end{proof}

\begin{exercise}
\label{exercise-powers}
Let $\alpha_1, \ldots, \alpha_n \in \mathbf{C}$. Then for any conic sector
containing the positive real axis of the form $C_\varepsilon = \{ z \in
\mathbf{C} \ | \ |\arg z| < \varepsilon \}$ with $\varepsilon > 0$, there exists
an integer $k \geq 1$ such that $\alpha_1^k, \ldots, \alpha_n^k \in
C_\varepsilon$.
\end{exercise}

\noindent
Then prove that $|\alpha_i| \leq q$ for all $i$. Then, use elementary
considerations on complex numbers to prove (as in the proof of the prime number
theorem) that $|\alpha_i| < q$. In fact, the Riemann hypothesis says that for
all $|\alpha_i| = \sqrt{q}$ for all $i$. We will come back to this later.

\medskip\noindent
{\bf Affine case.}
Assume now that $X$ is affine, say $X= \bar X-\left\{x_1, \ldots, x_n\right\}$
where $j : X \hookrightarrow \bar X$ is a projective nonsingular completion.
Then $H_c^0(X_{\bar k}, \mathbf{Q}_\ell) = 0$ and $H_c^2(X_{\bar k},
\mathbf{Q}_\ell) = H^2(\bar X_{\bar k}, \mathbf{Q}_\ell)$ so
Theorem \ref{theorem-B}
reads
$$
L(X, \mathbf{Q}_\ell) = \prod_{x \in |X|}\frac{1}{1 - T^{\deg x}} =
\frac{\det(1-\pi_X^*T |_{H_c^1(X_{\bar k}, \mathbf{Q}_\ell)})}{1 - qT}.
$$
On the other hand, the previous case gives
\begin{eqnarray*}
L(X, \mathbf{Q}_\ell) & = & L(\bar X,
\mathbf{Q}_\ell)\prod_{i = 1}^n\left(1-T^{\deg x_i}\right) \\
& = & \frac{\prod_{i = 1}^n(1-T^{\deg
x_i})\prod_{j = 1}^{2g}(1-\alpha_jT)}{(1-T)(1-qT)}.
\end{eqnarray*}
Therefore, we see that $\dim H_c^1(X_{\bar k}, \mathbf{Q}_\ell) =
2g+\sum_{i = 1}^n \deg(x_i)-1$, and the eigenvalues $\alpha_1, \ldots,
\alpha_{2g}$ of $\pi_{\bar X}^*$ acting on the degree 1 cohomology are roots of
unity. More precisely, each $x_i$ gives a complete set of $\deg(x_i)$th roots
of unity, and one occurrence of 1 is omitted. To see this directly using
coherent sheaves, consider the short exact sequence on $\bar X$
$$
0\to j_!\mathbf{Q}_\ell\to \mathbf{Q}_\ell\to\bigoplus_{i = 1}^n
\mathbf{Q}_{\ell, x_i}\to 0.
$$
The long exact cohomology sequence reads
$$
0\to \mathbf{Q}_\ell \to \bigoplus_{i = 1}^n \mathbf{Q}_\ell^{\oplus \deg x_i}
\to H_c^1(X_{\bar k}, \mathbf{Q}_\ell) \to H_c^1(\bar X_{\bar k},
\mathbf{Q}_\ell)\to 0
$$
where the action of Frobenius on $\bigoplus_{i = 1}^n \mathbf{Q}_\ell^{\oplus
\deg x_i}$ is by cyclic permutation of each term; and $H_c^2(X_{\bar k},
\mathbf{Q}_\ell) = H_c^2(\bar X_{\bar k}, \mathbf{Q}_\ell)$.






\section{The Legendre family}
\label{section-legendre-family}

\noindent
Let $k$ be a finite field of odd characteristic,
$X = \Spec(k[\lambda, \frac{1}{\lambda(\lambda - 1)}])$, and
consider the family of elliptic
curves $f : E \to X$ on $\mathbf{P}^2_X$ whose affine equation is $y^2 =
x(x - 1)(x - \lambda)$. We set $\mathcal{F} = Rf_*^1\mathbf{Q}_\ell =
\left\{R^1f_*\mathbf{Z}/\ell^n\mathbf{Z}\right\}_{n\geq 1} \otimes
\mathbf{Q}_\ell$. In this situation, the following is true
\begin{itemize}
\item for each $n \geq 1$, the sheaf $R^1f_*(\mathbf{Z}/\ell^n\mathbf{Z})$ is
finite locally constant -- in fact, it is free of rank 2 over
$\mathbf{Z}/\ell^n\mathbf{Z}$,
\item the system $\{R^1f_*\mathbf{Z}/\ell^n\mathbf{Z}\}_{n\geq 1}$ is a lisse
$\ell$-adic sheaf, and
\item for all $x\in |X|$,
$\det(1 - \pi_x\ T^{\deg x} |_{\mathcal{F}_{\bar x}}) =
(1 - \alpha_x T^{\deg x})(1 - \beta_x T^{\deg x})$
where $\alpha_x, \beta_x$ are the eigenvalues of the geometric
frobenius of $E_x$ acting on $H^1(E_{\bar x}, \mathbf{Q}_\ell)$.
\end{itemize}
Note that $E_x$ is only defined over $\kappa(x)$ and not over $k$. The proof of
these facts uses the proper base change theorem and the local acyclicity of
smooth morphisms. For details, see \cite{SGA4.5}. It follows that
$$
L(E/X) := L(X, \mathcal{F}) = \prod_{x\in |X|}
\frac{1}{(1-\alpha_xT^{\deg x})(1-\beta_xT^{\deg x })} .
$$
Applying Theorem \ref{theorem-B} we get
$$
L(E/X) =
\prod_{i = 0}^2
\det\left(1 - \pi_X^*T |_{H_c^i(X_{\bar k}, \mathcal{F})}\right)^{(-1)^{i+1}},
$$
and we see in particular that this is a rational function. Furthermore, it is
relatively easy to show that $H_c^0(X_{\bar k}, \mathcal{F}) = H_c^2(X_{\bar
k}, \mathcal{F}) = 0$, so we merely have
$$
L(E/X) = \det(1 - \pi_X^*T |_{H_c^1(X, \mathcal{F})}).
$$
To compute this determinant explicitly, consider the Leray spectral sequence
for the proper morphism $f : E \to X$ over $\mathbf{Q}_\ell$, namely
$$
H_c^i(X_{\bar k}, R^jf_*\mathbf{Q}_\ell) \Rightarrow H_c^{i+j}(E_{\bar
k}, \mathbf{Q}_\ell)
$$
which degenerates. We have $f_*\mathbf{Q}_\ell = \mathbf{Q}_\ell$ and
$R^1f_*\mathbf{Q}_\ell = \mathcal{F}$. The sheaf $R^2f_*\mathbf{Q}_\ell =
\mathbf{Q}_\ell(-1)$ is the {\it Tate twist} of $\mathbf{Q}_\ell$, i.e.,
it is the sheaf $\mathbf{Q}_\ell$ where the Galois action is given by
multiplication by $\#\kappa(x)$ on the stalk at $\bar x$. It follows that,
for all $n\geq 1$,
\begin{align*}
\# E(k_n)
& =
\sum\nolimits_i (-1)^i
\text{Tr}({\pi_E^n}^* |_{H_c^i(E_{\bar k}, \mathbf{Q}_\ell)}) \\
& =
\sum\nolimits_{i, j} (-1)^{i+j}
\text{Tr}({\pi^n_X}^* |_{H_c^i(X_{\bar k}, R^jf_*\mathbf{Q}_\ell)}) \\
& =
(q^n - 2) +
\text{Tr}({\pi_X^n}^* |_{H_c^1(X_{\bar k}, \mathcal{F})}) + q^n(q^n - 2) \\
& =
q^{2n} - q^n - 2 +
\text{Tr}({\pi_X^n}^* |_{H_c^1(X_{\bar k}, \mathcal{F})})
\end{align*}
where the first equality follows from
Theorem \ref{theorem-C},
the second one from
the Leray spectral sequence and the third one by writing down the higher direct
images of $\mathbf{Q}_\ell$ under $f$. Alternatively, we could write
$$
\# E(k_n) = \sum_{x \in X(k_n)} \# E_x(k_n)
$$
and use the trace formula for each curve. We can also find the number of
$k_n$-rational points simply by counting. The zero section contributes $q^n -2$
points (we omit the points where $\lambda = 0, 1$) hence
$$
\# E(k_n) =
q^n - 2 + \# \{y^2 = x(x - 1)(x - \lambda), \lambda\neq 0, 1\}.
$$
Now we have
$$
\begin{matrix}
\# \{y^2 = x(x - 1)(x - \lambda),\ \lambda\neq 0, 1\} \\
\\
\quad =
\# \{y^2 = x(x - 1)(x - \lambda)\text{ in }\mathbf{A}^3\}
- \# \{y^2 = x^2(x - 1)\} - \# \{y^2 = x(x - 1)^2\}\\
\\
\quad = \# \{\lambda = \frac{-y^2}{x(x - 1)} + x,\ x\neq 0, 1\} +
\# \{y^2 = x(x - 1)(x - \lambda), x = 0, 1\} - 2(q^n - \varepsilon_n) \\
\\
\quad = q^n(q^n - 2)+2q^n - 2(q^n - \varepsilon_n)\\
\\
\quad = q^{2n}-2q^n+2\varepsilon_n
\end{matrix}
$$
where $\varepsilon_n = 1$ if $-1$ is a square in $k_n$, 0 otherwise,
i.e.,
$$
\varepsilon_n = \frac{1}{2}\left(1+\left(\frac{-1}{k_n}\right)\right) =
\frac{1}{2}\left(1+(-1)^{\frac{q^n - 1}{2}}\right).
$$
Thus $ \# E(k_n) = q^{2n} - q^n - 2+ 2\varepsilon_n$.
Comparing with the previous formula, we find
$$
\text{Tr}({\pi_X^n}^* |_{H_c^1(X_{\bar k}, \mathcal{F})}) =
2 \varepsilon_n = 1 + (-1)^{\frac{q^n - 1}{2}},
$$
which implies, by elementary algebra of complex numbers, that if $-1$ is a
square in $k_n^*$, then $\dim H_c^1(X_{\bar k}, \mathcal{F}) = 2$ and the
eigenvalues are $1$ and $1$. Therefore, in that case we have
$$
L(E/X) = (1 - T)^2.
$$




\section{Exponential sums}
\label{section-exponential-sums}

\noindent
A standard problem in number theory is to evaluate sums of the form
$$
S_{a, b}(p) = \sum_{x\in \mathbf{F}_p - \left\{0, 1\right\}} e^{\frac{2\pi
ix^a(x - 1)^b}{p}}.
$$
In our context, this can be interpreted as a cohomological sum as follows.
Consider the base scheme
$S = \Spec(\mathbf{F}_p[x, \frac{1}{x(x - 1)}])$ and the affine curve
$f : X \to \mathbf{P}^1-\{0, 1, \infty\}$ over $S$ given by the equation
$y^{p - 1} = x^a(x - 1)^b$. This is a finite \'etale Galois cover with group
$\mathbf{F}_p^*$ and there is a splitting
$$
f_*(\bar{\mathbf{Q}}_\ell^*) =
\bigoplus_{\chi : \mathbf{F}_p^*\to \bar{\mathbf{Q}}_\ell^*} \mathcal{F}_\chi
$$
where $\chi$ varies over the characters of $\mathbf{F}_p^*$ and
$\mathcal{F}_\chi$ is a rank 1 lisse $\mathbf{Q}_\ell$-sheaf on which
$\mathbf{F}_p^*$ acts via $\chi$ on stalks. We get a corresponding decomposition
$$
H_c^1(X_{\bar k}, \mathbf{Q}_\ell) = \bigoplus_\chi H^1(\mathbf{P}_{\bar
k}^1-\{0, 1, \infty\}, \mathcal{F}_\chi)
$$
and the cohomological interpretation of the exponential sum is given by the
trace formula applied to $\mathcal{F}_\chi$ over $\mathbf{P}^1 - \{0, 1,
\infty\}$ for some suitable $\chi$. It reads
$$
S_{a, b}(p) =
-\text{Tr}(\pi_X^*
|_{H^1(\mathbf{P}_{\bar k}^1-\{0, 1, \infty\}, \mathcal{F}_\chi)}).
$$
The general yoga of Weil suggests that there should be some cancellation in the
sum. Applying (roughly) the Riemann-Hurwitz formula, we see that
$$
2g_X-2 \approx -2 (p-1) + 3(p-2) \approx p
$$
so $g_X\approx p/2$, which also suggests that the $\chi$-pieces are small.



%12.01.09
\section{Trace formula in terms of fundamental groups}
\label{section-trace-formula-fundamental-group}

\noindent
In the following sections we reformulate the trace formula completely
in terms of the fundamental group of a curve, except if the curve
happens to be $\mathbf{P}^1$.




\section{Fundamental groups}
\label{section-fundamental-groups}

\noindent
This material is discussed in more detail in the chapter on
fundamental groups. See
Fundamental Groups, Section \ref{pione-section-introduction}.
Let $X$ be a connected scheme and let $\overline{x}\to X$ be a
geometric point. Consider the functor
$$
\begin{matrix}
F_{\overline{x}}: &
\text{ finite \'etale } \atop \text{ schemes over } X &
\longrightarrow & \text{ finite sets} \\
&
Y/X &
\longmapsto &
F_{\overline{x}}(Y) =
\left\{\text{ geom points }\overline y \atop \text{ of } Y
\text{ lying over }\overline{x}\right\} = Y_{\overline{x}}
\end{matrix}
$$
Set
$$
\pi_1(X, \overline{x})
=
Aut(F_{\overline{x}})
=
\text{ set of automorphisms of the functor }F_{\overline{x}}
$$
Note that for every finite \'etale $Y \to X$ there is an action
$$
\pi_1(X, \overline{x}) \times F_{\overline{x}}(Y) \to F_{\overline{x}}(Y)
$$

\begin{definition}
\label{definition-open}
A subgroup of the form
$\text{Stab}(\overline y\in F_{\overline{x}}(Y))\subset \pi_1(X, \overline{x})$
is called {\it open}.
\end{definition}

\begin{theorem}[Grothendieck]
\label{theorem-fundamental-group}
Let $X$ be a connected scheme.
\begin{enumerate}
\item There is a topology on $\pi_1(X, \overline{x})$ such that the open
subgroups form a fundamental system of open nbhds of $e\in \pi_1(X, \overline
x)$.
\item With topology of (1) the group
$\pi_1(X, \overline{x})$ is a profinite group.
\item The functor
$$
\begin{matrix}
\text{ schemes finite } \atop \text{ \'etale over }X & \to &
\text{ finite discrete continuous } \atop \pi_1(X, \overline{x})\text{-sets}\\
Y / X& \mapsto & F_{\overline{x}}(Y) \text{ with its natural action}
\end{matrix}
$$
is an equivalence of categories.
\end{enumerate}
\end{theorem}

\begin{proof}
See \cite{SGA1}.
\end{proof}

\begin{proposition}
\label{proposition-integral-normal-fundamental-group}
Let $X$ be an integral normal Noetherian scheme. Let
$\overline y\to X$ be an algebraic geometric point lying
over the generic point $\eta\in X$. Then
$$
\pi_x(X, \overline \eta) = Gal(M/\kappa(\eta))
$$
($\kappa(\eta)$, function field of $X$) where
$$
\kappa(\overline \eta)\supset M\supset \kappa(\eta) = k(X)
$$
is the max sub-extension such that for every finite sub extension
$M\supset L\supset \kappa(\eta)$ the normalization of $X$ in $L$ is finite
\'etale over $X$.
\end{proposition}

\begin{proof}
Omitted.
\end{proof}

\noindent
{\bf Change of base point.} For any $\overline{x}_1, \overline{x}_2$
geom. points of $X$ there exists an isom. of fibre functions
$$
\mathcal{F}_{\overline{x}_1} \cong \mathcal{F}_{\overline{x}_2}
$$
(This is a path from $\overline{x}_1$ to $\overline{x}_2$.) Conjugation
by this path gives isom
$$
\pi_1(X, \overline{x}_1) \cong \pi_1(X, \overline{x}_2)
$$
well defined up to inner actions.

\medskip\noindent
{\bf Functoriality.} For any morphism $X_1\to X_2$ of connected schemes
any $\overline{x}\in X_1$ there is a canonical map
$$
\pi_1(X_1, \overline{x}) \to \pi_1(X_2, \overline{x})
$$
(Why? because the fibre functor ...)

\medskip\noindent
{\bf Base field.} Let $X$ be a variety over a field $k$. Then we get
$$
\pi_1(X, \overline{x}) \to
\pi_1(Spec(k), \overline{x}) =^{\text{prop}} Gal(k^{\text{sep}}/k)
$$
This map is surjective if and only if $X$ is geometrically connected over $k$.
So in the geometrically connected case we get s.e.s. of profinite
groups
$$
1 \to \pi_1(X_{\overline{k}}, \overline{x}) \to
\pi_1(X, \overline{x}) \to
Gal(k^{\text{sep}}/k) \to 1
$$
($\pi_1(X_{\overline{k}}, \overline{x})$: geometric fundamental group of
$X$, $\pi_1(X, \overline{x})$: arithmetic fundamental group of $X$)

\medskip\noindent
{\bf Comparison.} If $X$ is a variety over $\mathbf{C}$ then
$$
\pi_1(X, \overline{x}) =
\text{ profinite completion of }
\pi_1(X(\mathbf{C})(\text{ usual topology}), x)
$$
(have $x\in X(\mathbf{C})$)

\medskip\noindent
{\bf Frobenii.} $X$ variety over $k$, $\# k < \infty$. For any $x \in X$
closed point, let
$$
F_x\in \pi_1(x, \overline{x}) =
\text{Gal}(\kappa(x)^{\text{sep}}/\kappa(x))
$$
be the geometric frobenius.
Let $\overline\eta$ be an alg. geom. gen. pt. Then
$$
\pi_1(X, \overline\eta) \leftarrow^{\cong}
\pi_1(X, \overline{x})
{\text{functoriality} \atop \leftarrow} \pi_1(x, \overline{x})
$$

\noindent
Easy fact:
$$
\begin{matrix}
\pi_1(X, \overline \eta) & \to^{\deg} \pi_1(\Spec(k), \overline \eta) * &
= Gal(k^{sep}/k) \\
& & || \\
& & \widehat{\mathbf{Z}}\cdot F_{\Spec(k)} \\
F_x & \mapsto & \deg(x)\cdot F_{\Spec(k)}
\end{matrix}
$$
Recall: $\deg(x) = [\kappa(x):k]$

\medskip\noindent
{\bf Fundamental groups and lisse sheaves.}
Let $X$ be a connected scheme, $\overline{x}$ geom. pt. There are
equivalences of categories
$$
\begin{matrix}
(\Lambda\text{ finite ring}) &
\text{fin. loc. const. sheaves of }
\atop \Lambda\text{-modules of }X_\etale & \leftrightarrow &
\text{ finite (discrete) }\Lambda\text{-modules}
\atop \text{ with continuous }\pi_1(X, \overline{x})\text{-action}\\
\\
(\ell\text{ a prime}) & \text{ lisse }\ell\text{-adic} \atop \text{ sheaves} &
\leftrightarrow &
\text{finitely generated }\mathbf{Z}_\ell
\text{-modules }M\text{ with continuous}
\atop \pi_1(X, \overline{x})\text{-action where we use }
\ell\text{-adic topology on }M
\end{matrix}
$$
In particular lisse $\mathbf{Q}_l$-sheaves correspond to continuous
homomorphisms
$$
\pi_1(X, \overline{x}) \to \text{GL}_r(\mathbf{Q}_l), \quad r\geq 0
$$

\noindent
Notation: A module with action $(M, \rho)$ corresponds to the sheaf
$\mathcal{F}_\rho$.

\medskip\noindent
{\bf Trace formulas.} $X$ variety over $k$, $\# k < \infty$.
\begin{enumerate}
\item $\Lambda$ finite ring $(\# \Lambda, \# k)=1$
$$
\rho : \pi_1(X, \overline{x})\to \text{GL}_r(\Lambda)
$$
continuous. For every $n\geq 1$ we have
$$
\sum_{d|n}d\left(
\sum_{x\in |X|, \atop \deg(x)=d}
\text{Tr}(\rho(F_x^{n/d}))\right) =
\text{Tr}\left(
(\pi_x^n)^* |_{R\Gamma_c(X_{\overline{k}}, \mathcal{F}_\rho)}\right)
$$
\item $l\neq char(k)$ prime, $\rho : \pi_1(X, \overline{x})\to
\text{GL}_r(\mathbf{Q}_l)$. For any $n\geq 1$
$$
\sum_{d|n} d\left(
\sum_{x\in |X| \atop \deg(x)=d}
\text{Tr}
\left(
\rho(F_x^{n/d})
\right)
\right) =
\sum_{i = 0}^{2\dim X}
(-1)^i
\text{Tr}\left(
\pi_X^* |_{H_c^i(X_{\overline{k}}, \mathcal{F}_\rho)}\right)
$$
\end{enumerate}

\noindent
{\bf Weil conjectures.} (Deligne-Weil I, 1974) $X$ smooth proj. over $k$,
$\# k = q$, then the eigenvalues of $\pi_X^*$ on $H^i(X_{\overline{k}},
\mathbf{Q}_l)$ are algebraic integers $\alpha$ with $|\alpha|=q^{1/2}$.

\medskip\noindent
{\bf Deligne's conjectures.} (almost completely proved by
Lafforgue + $\ldots$) Let $X$ be a normal variety over $k$ finite
$$
\rho : \pi_1(X, \overline{x}) \longrightarrow \text{GL}_r(\mathbf{Q}_l)
$$
continuous. Assume: $\rho$ irreducible $\det(\rho)$ of finite order. Then
\begin{enumerate}
\item there exists a number field $E$ such that for all $x\in
|X|$(closed points) the char. poly of $\rho(F_x)$ has coefficients in $E$.
\item for any $x\in |X|$ the eigenvalues $\alpha_{x, i}$, $i = 1, \ldots,
r$ of $\rho(F_x)$ have complex absolute value $1$.
(these are algebraic numbers not necessary integers)
\item for every finite place $\lambda$( not dividing $p$), of $E$
(maybe after enlarging $E$ a bit) there exists
$$
\rho\lambda : \pi_1(X, \overline{x}) \to \text{GL}_r(E_\lambda)
$$
compatible with $\rho$. (some char. polys of $F_x$'s)
\end{enumerate}

\begin{theorem}[Deligne, Weil II]
\label{theorem-weil-II}
For a sheaf
$\mathcal{F}_\rho$ with $\rho$ satisfying the conclusions of the conjecture
above then the eigenvalues of $\pi_X^*$ on $H_c^i(X_{\overline{k}},
\mathcal{F}_{\rho})$ are algebraic numbers $\alpha$ with absolute values
$$
|\alpha|=q^{w/2}, \text{ for }w\in \mathbf{Z},\ w\leq i
$$
Moreover, if $X$ smooth and proj. then $w = i$.
\end{theorem}

\begin{proof}
See \cite{WeilII}.
\end{proof}




%12.03.09
\section{Profinite groups, cohomology and homology}
\label{section-profinite-cohomology}

\noindent
Let $G$ be a profinite group.

\medskip\noindent
{\bf Cohomology.}
Consider the category of discrete modules with continuous $G$-action.
This category has enough injectives and we can define
$$
H^i(G, M) = R^iH^0(G, M) = R^i(M\mapsto M^G)
$$
Also there is a derived version $RH^0(G, -)$.

\medskip\noindent
{\bf Homology.}
Consider the category of compact abelian groups with continuous $G$-action.
This category has enough projectives and we can define
$$
H_i(G, M) = L_iH_0(G, M)=L_i(M\mapsto M_G)
$$
and there is also a derived version.

\medskip\noindent
{\bf Trivial duality.}
The functor $M\mapsto M^\wedge = \Hom_{cont}(M, S^1)$
exchanges the categories above and
$$
H^i(G, M)^\wedge = H_i(G, M^\wedge)
$$
Moreover, this functor maps torsion discrete $G$-modules to profinite
continuous $G$-modules and vice versa, and if $M$ is either a discrete or
profinite continuous $G$-module, then
$M^\wedge = \Hom(M, \mathbf{Q}/\mathbf{Z})$.

\medskip\noindent
{\bf Notes on Homology.}
\begin{enumerate}
\item If we look at $\Lambda$-modules for a finite ring $\Lambda$
then we can identify
$$
H_i(G, M)=Tor_i^{\Lambda[[G]]}(M, \Lambda)
$$
where $\Lambda[[G]]$ is the limit of the group algebras of the finite
quotients of $G$.
\item If $G$ is a normal subgroup of $\Gamma$, and $\Gamma$ is also
profinite then
\begin{itemize}
\item $H^0(G, -)$: discrete $\Gamma$-module$\to$ discrete
$\Gamma/G$-modules
\item $H_0(G, -)$: compact $\Gamma$-modules $\to$ compact
$\Gamma/G$-modules
\end{itemize}
and hence the profinite group $\Gamma/G$ acts on the cohomology groups
of $G$ with values in a $\Gamma$-module. In other words, there are derived
functors
$$
RH^0(G, -) :
D^{+}(\text{discrete }\Gamma\text{-modules})
\longrightarrow
D^{+}(\text{discrete }\Gamma/G\text{-modules})
$$
and similarly for $LH_0(G, -)$.
\end{enumerate}








\section{Cohomology of curves, revisited}
\label{section-cohomology-curves-revisited}

\noindent
Let $k$ be a field, $X$ be geometrically connected, smooth curve over $k$.
We have the fundamental short exact sequence
$$
1 \to
\pi_1(X_{\overline{k}}, \overline \eta) \to
\pi_1(X, \overline\eta) \to
\text{Gal}(k^{^{sep}}/k) \to 1
$$
If $\Lambda$ is a finite ring with $\#\Lambda\in k^*$ and $M$ a finite
$\Lambda$-module, and we are given
$$
\rho : \pi_1(X, \overline\eta) \to \text{Aut}_{\Lambda}(M)
$$
continuous, then $\mathcal{F}_\rho$ denotes the associated sheaf on
$X_\etale$.

\begin{lemma}
\label{lemma-identify-h2c}
There is a canonical isomorphism
$$
H_c^2(X_{\overline{k}}, \mathcal{F}_\rho)=(M)_{\pi_1(X_{\overline{k}},
\overline\eta)}(-1)
$$
as $\text{Gal}(k^{^{sep}}/k)$-modules.
\end{lemma}

\noindent
Here the subscript ${}_{\pi_1(X_{\overline{k}}, \overline\eta)}$
indicates co-invariants, and $(-1)$ indicates the Tate twist i.e.,
$\sigma\in \text{Gal}(k^{^{sep}}/k)$ acts via
$$
\chi_{cycl}(\sigma)^{-1}.\sigma\text{ on RHS}
$$
where
$$
\chi_{cycl} :
\text{Gal}(k^{^{sep}}/k)
\to
\prod\nolimits_{l\neq char(k)}\mathbf{Z}_l^*
$$
is the cyclotomic character.

\medskip\noindent
Reformulation (Deligne, Weil II, page 338). For any finite locally
constant sheaf $\mathcal{F}$ on $X$ there is a maximal quotient $\mathcal{F}\to
\mathcal{F}''$ with $\mathcal{F}''/X_{\overline{k}}$ a constant sheaf, hence
$$
\mathcal{F}'' = (X\to \Spec(k))^{-1}F''
$$
where $F''$ is a sheaf $\Spec(k)$, i.e., a
$\text{Gal}(k^{^{sep}}/k)$-module. Then
$$
H_c^2(X_{\overline{k}}, \mathcal{F})\to H_c^2(X_{\overline{k}},
\mathcal{F}'')\to F''(-1)
$$
is an isomorphism.

\begin{proof}[Proof of Lemma \ref{lemma-identify-h2c}]
Let $Y\to^{\varphi}X$ be the finite \'etale Galois covering
corresponding to $\Ker(\rho) \subset \pi_1(X, \overline\eta)$. So
$$
\text{Aut}(Y/X)=Ind(\rho)
$$
is Galois group. Then $\varphi^*\mathcal{F}_\rho =\underline M_Y$ and
$$
\varphi_*\varphi^*\mathcal{F}_\rho\to \mathcal{F}_\rho
$$
which gives
\begin{align*}
& H_c^2(X_{\overline{k}}, \varphi_*\varphi^*\mathcal{F}_\rho) \to
H_c^2(X_{\overline{k}}, \mathcal{F}_\rho)\\
& =H_c^2(Y_{\overline{k}}, \varphi^*\mathcal{F}_\rho)\\
& =H_c^2(Y_{\overline{k}}, \underline M) = \oplus_{\text{irred.
comp. of } \atop Y_{\overline{k}}}M
\end{align*}
$$
\Im(\rho) \to H_c^2(Y_{\overline{k}}, \underline M) =
\oplus_{\text{irred. comp. of } \atop Y_{\overline{k}}}
M \to_{\Im(\rho) \text{equivalent}} H_c^2(X_{\overline{k}},
\mathcal{F}_{\rho}) \to^{\text{trivial }
\Im(\rho) \atop \text{action}}
$$
irreducible curve $C/\overline{k}$, $H_c^2(C, \underline M)=M$.

\medskip\noindent
Since
$$
{\text{set of irreducible } \atop \text{components of }Y_k} =
\frac{Im(\rho)}{Im(\rho|_{\pi_1(X_{\overline{k}}, \overline \eta)})}
$$
We conclude that $H_c^2(X_{\overline{k}}, \mathcal{F}_\rho)$ is a
quotient of $M_{\pi_1(X_{\overline{k}}, \overline \eta)}$. On the other hand,
there is a surjection
$$
\mathcal{F}_\rho\to \mathcal{F}'' = {\text{ sheaf on }
X\text{ associated to } \atop (M)_{\pi_1(X_{\overline{k}}, \overline
\eta)}\leftarrow\pi_1(X, \overline \eta)}
$$
$$
H_c^2(X_{\overline{k}}, \mathcal{F}_\rho)\to
M_{\pi_1(X_{\overline{k}}, \overline\eta)}
$$
The twist in Galois action comes from the fact that
$H_c^2(X_{\overline{k}}, \mu_n)=^{\text{can}} \mathbf{Z}/n\mathbf{Z}$.
\end{proof}

\begin{remark}
\label{remark-projective}
Thus we conclude that if $X$ is also projective then
we have functorially in the representation $\rho$
the identifications
$$
H^0(X_{\overline{k}}, \mathcal{F}_\rho) =
M^{\pi_1(X_{\overline{k}}, \overline\eta)}
$$
and
$$
H_c^2(X_{\overline{k}}, \mathcal{F}_\rho) =
M_{\pi_1(X_{\overline{k}}, \overline \eta)}(-1)
$$
Of course if $X$ is not projective, then
$H^0_c(X_{\overline{k}}, \mathcal{F}_\rho) = 0$.
\end{remark}


\begin{proposition}
\label{proposition-curve-kpi1}
Let $X/k$ as before but $X_{\overline{k}}\neq \mathbf{P}^1_{\overline{k}}$
The functors
$
(M, \rho)\mapsto H_c^{2-i}(X_{\overline{k}}, \mathcal{F}_\rho)
$
are the left derived functor of
$(M, \rho)\mapsto H_c^2(X_{\overline{k}}, \mathcal{F}_\rho)$
so
$$
H_c^{2-i}(X_{\overline{k}}, \mathcal{F}_\rho) =
H_i(\pi_1(X_{\overline{k}}, \overline \eta), M)(-1)
$$
Moreover, there is a derived version, namely
$$
R\Gamma_c(X_{\overline{k}}, \mathcal{F}_\rho)
=
LH_0(\pi_1(X_{\overline{k}}, \overline \eta), M(-1))
=
M(-1)
\otimes_{\Lambda[[\pi_1(X_{\overline{k}}, \overline \eta)]]}^\mathbf{L}
\Lambda
$$
in $D(\Lambda[[\widehat{\mathbf{Z}}]])$.
Similarly, the functors
$(M, \rho)\mapsto H^i(X_{\overline{k}}, \mathcal{F}_\rho)$
are the right derived functor of
$(M, \rho)\mapsto M^{\pi_1(X_{\overline{k}}, \overline \eta)}$
so
$$
H^i(X_{\overline{k}}, \mathcal{F}_\rho) =
H^i(\pi_1(X_{\overline{k}}, \overline \eta), M)
$$
Moreover, in this case there is a derived version too.
\end{proposition}

\begin{proof}
(Idea) Show both sides are universal $\delta$-functors.
\end{proof}

\begin{remark}
\label{remark-poincare-groups}
By the proposition and Trivial duality then you get
$$
H^{2-i}_c(X_{\overline{k}}, \mathcal{F}_\rho)
\times
H^i(X_{\overline{k}}, \mathcal{F}_\rho^\wedge(1))
\to
\mathbf{Q}/\mathbf{Z}
$$
a perfect pairing. If $X$ is projective then this is Poincare duality.
\end{remark}





\section{Abstract trace formula}
\label{section-abstract-trace-formula}

\noindent
Suppose given an extension of profinite groups,
$$
1 \to G \to \Gamma \xrightarrow{\deg} \widehat{\mathbf{Z}} \to 1
$$
We say $\Gamma$ {\it has an abstract trace formula} if and only if
there exist
\begin{enumerate}
\item an integer $q\geq 1$, and
\item for every $d\geq 1$ a finite set $S_d$ and for each $x\in S_d$ a
conjugacy class $F_x \in \Gamma$ with $\deg(F_x) = d$
\end{enumerate}
such that the following hold
\begin{enumerate}
\item for all $\ell$ not dividing $q$ have $\text{cd}_\ell(G)<\infty$, and
\item for all finite rings $\Lambda$ with $q\in \Lambda^*$,
for all finite projective $\Lambda$-modules $M$ with continuous
$\Gamma$-action, for all $n > 0$ we have
$$
\sum\nolimits_{d|n}d \left(
\sum\nolimits_{x \in S_d}
\text{Tr}( F_x^{n/d} |_M)
\right)
=
q^n \text{Tr}(F^n|_{M \otimes_{\Lambda[[G]]}^{\mathbf{L}}\Lambda})
$$
in $\Lambda^\natural$.
\end{enumerate}
Here $M \otimes_{\Lambda[[G]]}^{\mathbf{L}}\Lambda = LH_0(G, M)$ denotes
derived homology, and $F=1$ in $\Gamma/G = \widehat{\mathbf{Z}}$.

\begin{remark}
\label{remark-abstract-trace-formula}
Here are some observations concerning this notion.
\begin{enumerate}
\item If modeling projective curves then we can use cohomology and we
don't need factor $q^n$.
\item The only examples I know are $\Gamma = \pi_1(X, \overline \eta)$
where $X$ is smooth, geometrically irreducible and $K(\pi, 1)$ over finite
field. In this case $q = (\# k)^{\dim X}$. Modulo the proposition, we proved
this for curves in this course.
\item Given the integer $q$ then the sets $S_d$ are uniquely
determined. (You can multiple $q$ by an integer $m$ and then replace $S_d$ by
$m^d$ copies of $S_d$ without changing the formula.)
\end{enumerate}
\end{remark}

\begin{example}
\label{example-commutative}
Fix an integer $q\geq 1$
$$
\begin{matrix}
1 &
\to &
G = \widehat{\mathbf{Z}}^{(q)} &
\to &
\Gamma &
\to &
\widehat{\mathbf{Z}} &
\to &
1 \\
&
&
= \prod_{l\not \mid q} \mathbf{Z}_l &
&
F &
\mapsto &
1
\end{matrix}
$$
with $FxF^{-1} = ux$, $u \in (\widehat{\mathbf{Z}}^{(q)})^*$.
Just using the trivial modules
$\mathbf{Z}/m\mathbf{Z}$ we see
$$
q^n - (qu)^n \equiv \sum\nolimits_{d|n} d\# S_d
$$
in $\mathbf{Z}/m\mathbf{Z}$ for all $(m, q)=1$ (up to
$u \to u^{-1}$) this implies $qu = a\in \mathbf{Z}$
and $|a| < q$. The special case $a = 1$ does occur with
$$
\Gamma = \pi_1^t(\mathbf{G}_{m, \mathbf{F}_p}, \overline \eta),
\quad
\# S_1 = q - 1,
\quad\text{and}\quad
\# S_2 = \frac{(q^2-1)-(q-1)}{2}
$$
\end{example}



%12.08.09
\section{Automorphic forms and sheaves}
\label{section-automorphic}

\noindent
References: See especially the amazing papers
\cite{D1}, \cite{D2} and \cite{D0} by Drinfeld.

\medskip\noindent
{\bf Unramified cusp forms.}
Let $k$ be a finite field of characteristic $p$.
Let $X$ geometrically irreducible projective smooth curve over $k$.
Set $K = k(X)$ equal to the function field of $X$.
Let $v$ be a place of $K$ which is the same thing as a
closed point $x\in X$. Let $K_v$ be the completion of $K$ at $v$, which
is the same thing as the fraction field of the completion of
the local ring of $X$ at $x$.
Denote $O_v\subset K_v$ the ring of integers. We further set
$$
O = \prod\nolimits_v O_v \subset \mathbf{A} = \prod_v' K_v
$$
and we let $\Lambda$ be any ring with $p$ invertible in $\Lambda$.

\begin{definition}
\label{definition-unramified}
An {\it unramified cusp form on $\text{GL}_2(\mathbf{A})$ with values in
$\Lambda$}\footnote{This is likely nonstandard notation.}
is a function
$$
f : \text{GL}_2(\mathbf{A}) \to \Lambda
$$
such that
\begin{enumerate}
\item $f(x\gamma) = f(x)$ for all $x\in \text{GL}_2(\mathbf{A})$ and all
$\gamma\in \text{GL}_2(K)$
\item $f(ux) = f(x)$ for all $x\in \text{GL}_2(\mathbf{A})$ and all
$u\in \text{GL}_2(O)$
\item for all $x\in \text{GL}_2(\mathbf{A})$,
$$
\int_{\mathbf{A} \mod K} f
\left(x
\left(
\begin{matrix}
1 & z \\
0 & 1
\end{matrix}
\right)
\right) dz = 0
$$
see \cite[Section 4.1]{dJ-conjecture}
for an explanation of how to make sense out
of this for a general ring $\Lambda$ in which $p$ is invertible.
\end{enumerate}
\end{definition}

\noindent
{\bf Hecke Operators.}
For $v$ a place of $K$ and $f$ an unramified cusp form we set
$$
T_v(f)(x) =
\int_{g\in M_v}f(g^{-1}x)dg,
$$
and
$$
U_v(f)(x) =
f\left(
\left(
\begin{matrix}
\pi_v^{-1} & 0 \\
0 & \pi_v^{-1}
\end{matrix}
\right)x\right)
$$
Notations used: here $\pi_v \in O_v$ is a uniformizer
$$
M_v =
\left\{
h\in Mat(2\times 2, O_v) | \det h = \pi_vO_v^*\right\}
$$
and $dg = $ is the Haar measure on $\text{GL}_2(K_v)$ with
$\int_{\text{GL}_2(O_v)} dg = 1$. Explicitly we have
$$
T_v(f)(x) =
f\left(
\left(
\begin{matrix}
\pi_v^{-1}& 0 \\
0 & 1
\end{matrix}
\right)
x\right) +
\sum_{i = 1}^{q_v}
f\left(\left(
\begin{matrix}
1 & 0 \\
-\pi_v^{-1}\lambda_i
& \pi_v^{-1}
\end{matrix}
\right) x\right)
$$
with $\lambda_i\in O_v$ a set of representatives of
$O_v/(\pi_v)=\kappa_v$, $q_v = \#\kappa_v$.

\medskip\noindent
{\bf Eigenforms.} An {\it eigenform} $f$ is an unramified cusp form
such that some value of $f$ is a unit and $T_vf = t_vf$ and
$U_vf = u_vf$ for some (uniquely determined) $t_v, u_v \in \Lambda$.

\begin{theorem}
\label{theorem-drinfeld-make-rho}
Given an eigenform $f$ with values in
$\overline{\mathbf{Q}}_l$ and eigenvalues
$u_v\in \overline{\mathbf{Z}}_l^*$ then there exists
$$
\rho : \pi_1(X)\to \text{GL}_2(E)
$$
continuous, absolutely irreducible where
$E$ is a finite extension of $\mathbf{Q}_\ell$ contained in
$\overline{\mathbf{Q}}_l$ such that
$t_v = \text{Tr}(\rho(F_v))$, and
$u_v = q_v^{-1}\det\left(\rho(F_v)\right)$ for all places $v$.
\end{theorem}

\begin{proof}
See \cite{D0}.
\end{proof}

\begin{theorem}
\label{theorem-drinfeld-make-f}
Suppose $\mathbf{Q}_l \subset E$ finite, and
$$
\rho : \pi_1(X)\to \text{GL}_2(E)
$$
absolutely irreducible, continuous. Then there exists an eigenform $f$ with
values in $\overline{\mathbf{Q}}_l$ whose eigenvalues $t_v$, $u_v$
satisfy the equalities
$t_v = \text{Tr}(\rho(F_v))$ and $u_v = q_v^{-1}\det(\rho(F_v))$.
\end{theorem}

\begin{proof}
See \cite{D1}.
\end{proof}

\begin{remark}
\label{remark-lafforgue}
We now have, thanks to Lafforgue and many other mathematicians,
complete theorems like this two above for $\text{GL}_n$
and allowing ramification!
In other words, the full global Langlands correspondence for $\text{GL}_n$
is known for function fields of curves over finite fields. At the same
time this does not mean there aren't a lot of interesting questions left
to answer about the fundamental groups of curves over finite fields, as
we shall see below.
\end{remark}

\noindent
{\bf Central character.} If $f$ is an eigenform then
$$
\begin{matrix}
\chi_f : &
O^*\backslash \mathbf{A}^*/K^* &
\to &
\Lambda^* \\
&
(1, \ldots, \pi_v, 1, \ldots, 1) &
\mapsto &
u_v^{-1}
\end{matrix}
$$
is called the {\it central character}. If corresponds to the
determinant of $\rho$ via normalizations as above. Set
$$
C(\Lambda) =
\left\{
{\text{unr. cusp forms } f \text{ with coefficients in }\Lambda}
\atop {\text{ such that } U_v f = \varphi_v^{-1}f\forall v}
\right\}
$$

\begin{proposition}
\label{proposition-cusp-forms-finite}
If $\Lambda$ is Noetherian then $C(\Lambda)$ is a
finitely generated $\Lambda$-module. Moreover, if $\Lambda$ is a field with
prime subfield $\mathbf{F} \subset \Lambda$ then
$$
C(\Lambda)=(C(\mathbf{F}))\otimes_{\mathbf{F}}\Lambda
$$
compatibly with $T_v$ acting.
\end{proposition}

\begin{proof}
See \cite[Proposition 4.7]{dJ-conjecture}.
\end{proof}

\noindent
This proposition trivially implies the following lemma.

\begin{lemma}
\label{lemma-eigenvalues-algebraic}
Algebraicity of eigenvalues.
If $\Lambda$ is a field then the eigenvalues $t_v$ for $f\in
C(\Lambda)$ are algebraic over the prime subfield
$\mathbf{F} \subset \Lambda$.
\end{lemma}

\begin{proof}
Follows from Proposition \ref{proposition-cusp-forms-finite}.
\end{proof}

\noindent
Combining all of the above we can do the following very useful trick.

\begin{lemma}
\label{lemma-switch-l}
Switching $l$. Let $E$ be a number field.
Start with
$$
\rho : \pi_1(X)\to SL_2(E_\lambda)
$$
absolutely irreducible continuous, where $\lambda$ is a place of $E$
not lying above $p$. Then for any second place $\lambda'$ of $E$
not lying above $p$ there exists a finite extension $E'_{\lambda'}$
and a absolutely irreducible continuous representation
$$
\rho': \pi_1(X)\to SL_2(E'_{\lambda'})
$$
which is compatible with $\rho$ in the sense that the characteristic
polynomials of all Frobenii are the same.
\end{lemma}

\noindent
Note how this is an instance of Deligne's conjecture!

\begin{proof}
To prove the switching lemma use
Theorem \ref{theorem-drinfeld-make-f}
to obtain $f\in C(\overline{\mathbf{Q}}_l)$ eigenform ass. to $\rho$.
Next, use
Proposition \ref{proposition-cusp-forms-finite}
to see that we may choose $f\in C(E')$ with $E \subset E'$ finite.
Next we may complete $E'$ to see that we get
$f\in C(E'_{\lambda'})$ eigenform with
$E'_{\lambda'}$ a finite extension of $E_{\lambda'}$.
And finally we use
Theorem \ref{theorem-drinfeld-make-rho}
to obtain
$\rho': \pi_1(X) \to SL_2(E_{\lambda'}')$ abs. irred. and continuous
after perhaps enlarging $E'_{\lambda'}$ a bit again.
\end{proof}

\noindent
Speculation: If for a (topological) ring $\Lambda$ we have
$$
\left(
{\rho : \pi_1(X)\to SL_2(\Lambda) \atop \text{ abs irred}}
\right)
\leftrightarrow
\text{ eigen forms in } C(\Lambda)
$$
then all eigenvalues of $\rho(F_v)$ algebraic (won't work in an easy
way if $\Lambda$ is a finite ring. Based on the speculation that the
Langlands correspondence works more generally than just over fields
one arrives at the following conjecture.

\medskip\noindent
{\bf Conjecture.}
(See \cite{dJ-conjecture})
For any continuous
$$
\rho : \pi_1(X)\to \text{GL}_n(\mathbf{F}_l[[t]])
$$
we have $\# \rho(\pi_1(X_{\overline{k}}))<\infty$.

\medskip\noindent
A rephrasing in the language of sheaves:
"For any lisse sheaf of $\overline{\mathbf{F}_l((t))}$-modules the geom
monodromy is finite."

\begin{theorem}
\label{theorem-conjecture-n-2}
The Conjecture holds if $n\leq 2$.
\end{theorem}

\begin{proof}
See \cite{dJ-conjecture}.
\end{proof}

\begin{theorem}
\label{theorem-conjecture-l-bigger-2n}
Conjecture holds if $l > 2n$ modulo some unproven things.
\end{theorem}

\begin{proof}
See \cite{Gaitsgory}.
\end{proof}

\noindent
It turns out the conjecture is useful for something.
See work of Drinfeld on Kashiwara's conjectures. But there is also
the much more down to earth application as follows.

\begin{theorem}
\label{theorem-deformation-rings}
(See \cite[Theorem 3.5]{dJ-conjecture})
Suppose
$$
\rho_0: \pi_1(X)\to \text{GL}_n(\mathbf{F}_l)
$$
is a continuous, $l\neq p$. Assume
\begin{enumerate}
\item Conj. holds for $X$,
\item $\rho_0 |_{\pi_1(X_{\overline{k}})}$ abs. irred., and
\item $l$ does not divide $n$.
\end{enumerate}
Then the universal deformation ring $R_{\text{univ}}$ of $\rho_0$ is
finite flat over $\mathbf{Z}_l$.
\end{theorem}

\noindent
Explanation: There is a representation $\rho_{\text{univ}}:
\pi_1(X)\to \text{GL}_n(R_{\text{univ}})$ (Univ. Defo ring)
$R_{\text{univ}}$ loc.
complete, residue field $\mathbf{F}_l$ and $(R_{\text{univ}}\to
\mathbf{F}_l)\circ\rho_{\text{univ}}\cong\rho_0$.
And given any $R\to \mathbf{F}_l$, $R$ local complete and
$\rho : \pi_1(X)\to \text{GL}_n(R)$ then there exists
$\psi : R_{\text{univ}}\to R$ such that
$\psi\circ\rho_{\text{univ}}\cong \rho$. The theorem says that the morphism
$$
\Spec(R_{\text{univ}})
\longrightarrow
\Spec(\mathbf{Z}_l)
$$
is finite and flat. In particular, such a $\rho_0$
lifts to a $\rho : \pi_1(X) \to \text{GL}_n(\overline{\mathbf{Q}}_l)$.

\medskip\noindent
Notes:
\begin{enumerate}
\item The theorem on deformations is easy.
\item Any result towards the conjecture seems hard.
\item It would be interesting to have more conjectures on $\pi_1(X)$!
\end{enumerate}




%12.10.09
\section{Counting points}
\label{section-counting}

\noindent
Let $X$ be a smooth, geometrically irreducible,
projective curve over $k$ and $q = \# k$. The trace formula gives:
there exists algebraic integers $w_1, \ldots, w_{2g}$ such that
$$
\# X(k_n) = q^n - \sum\nolimits_{i = 1}^{2g_X} w_i^n + 1.
$$
If $\sigma\in \text{Aut}(X)$ then for all $i$, there exists $j$ such that
$\sigma(w_i)=w_j$.

\medskip\noindent
{\bf Riemann-Hypothesis.} For all $i$ we have $|\omega_i| = \sqrt{q}$.

\medskip\noindent
This was formulated by Emil Artin, in 1924, for
hyperelliptic curves. Proved by Weil 1940. Weil gave two proofs
\begin{itemize}
\item using intersection theory on $X \times X$, using the
Hodge index theorem, and
\item using the Jacobian of $X$.
\end{itemize}
There is another proof whose initial idea is due to Stephanov, and
which was given by Bombieri: it uses the function field $k(X)$ and
its Frobenius operator (1969). The starting point is that given
$f\in k(X)$ one observes that $f^q - f$ is a rational function which
vanishes in all the $\mathbf{F}_q$-rational points of $X$, and that one
can try to use this idea to give an upper bound for the number of points.


\section{Precise form of Chebotarev}
\label{section-chebotarev}

\noindent
As a first application let us prove a precise form of Chebotarev
for a finite \'etale Galois covering of curves.
Let $\varphi : Y \to X$ be a finite \'etale Galois covering with
group $G$. This corresponds to a homomorphism
$$
\pi_1(X) \longrightarrow G = \text{Aut}(Y/X)
$$
Assume $Y_{\overline{k}} = $ irreducible. If $C\subset G$ is a conjugacy
class then for all $n > 0$, we have
$$
| \# \{x \in X(k_n) \mid F_x \in C\} - \frac{\# C}{\# G} \cdot \# X(k_n) |
\leq
(\# C)(2g - 2) \sqrt{q^n}
$$
(Warning: Please check the coefficient $\# C$ on the right hand side
carefuly before using.)

\begin{proof}[Sketch]
Write
$$
\varphi_*(\overline{\mathbf{Q}_l}) =
\oplus_{\pi \in \widehat{G}} \mathcal{F}_{\pi}
$$
where $\widehat{G}$ is the set of isomorphism
classes of irred representations of
$G$ over $\overline{\mathbf{Q}}_l$. For $\pi \in \widehat{G}$
let $\chi_{\pi}: G \to \overline{\mathbf{Q}}_l$
be the character of $\pi$. Then
$$
H^*(Y_{\overline{k}}, \overline{\mathbf{Q}}_l) =
\oplus_{\pi\in \widehat{G}}
H^*(Y_{\overline{k}}, \overline{\mathbf{Q}}_l)_\pi
=_{(\varphi\text{ finite })}
\oplus_{\pi\in \widehat{G}}
H^*(X_{\overline{k}}, \mathcal{F}_\pi)
$$
If $\pi\neq 1$ then we have
$$
H^0(X_{\overline{k}}, \mathcal{F}_\pi) =
H^2(X_{\overline{k}}, \mathcal{F}_\pi) = 0,\quad
\dim H^1(X_{\overline{k}}, \mathcal{F}_\pi) = (2g_X - 2)d_\pi^2
$$
(can get this from trace formula for acting on ...) and we see that
$$
|\sum_{x \in X(k_n)} \chi_\pi(\mathcal{F}_x)| \leq
(2g_X - 2) d_\pi^2\sqrt{q^n}
$$
Write $1_C = \sum_\pi a_\pi \chi_\pi$, then
$a_\pi = \langle 1_C, \chi_\pi\rangle$, and
$a_1 = \langle 1_C, \chi_1\rangle = \frac{\# C}{\# G}$ where
$$
\langle f, h\rangle = \frac{1}{\# G}\sum_{g \in G} f(g)\overline{h(g)}
$$
Thus we have the relation
$$
\frac{\# C}{\# G} = ||1_C||^2 = \sum|a_\pi|^2
$$
Final step:
\begin{align*}
\#\left\{x \in X(k_n) \mid F_x \in C\right\}
& =
\sum_{x \in X(k_n)} 1_C(x) \\
& =
\sum_{x \in X(k_n)} \sum_\pi a_\pi \chi_\pi(F_x) \\
& =
\underbrace{\frac{\# C}{\# G} \# X(k_n)}_{
\text{term for }\pi = 1}
+
\underbrace{\sum_{\pi\neq 1}a_\pi\sum_{x\in X(k_n)}\chi_\pi(F_x)}_{
\text{ error term (to be bounded by }E)}
\end{align*}
We can bound the error term by
\begin{align*}
|E|
& \leq
\sum_{\pi \in \widehat{G}, \atop \pi \neq 1}
|a_\pi| (2g - 2) d_\pi^2 \sqrt{q^n} \\
& \leq
\sum_{\pi \neq 1} \frac{\# C}{\# G} (2g_X - 2) d_\pi^3 \sqrt{q^n}
\end{align*}
By Weil's conjecture, $\# X(k_n)\sim q^n$.
\end{proof}



\section{How many primes decompose completely?}
\label{section-how-many}

\noindent
This section gives a second application of the Riemann Hypothesis for
curves over a finite field. For number theorists it may be nice
to look at the paper by Ihara, entitled
``How many primes decompose completely in an infinite unramified Galois
extension of a global field?'', see \cite{Ihara}.
Consider the fundamental exact sequence
$$
1 \to
\pi_1(X_{\overline{k}}) \to
\pi_1(X) \xrightarrow{\deg}
\widehat{\mathbf{Z}} \to 1
$$

\begin{proposition}
\label{proposition-finite-set-frobenii-generate-topologically}
There exists a finite set $x_1, \ldots, x_n$ of closed points of $X$
such that set of {\bf all} frobenius elements corresponding to these
points topologically generate $\pi_1(X)$.
\end{proposition}

\noindent
Another way to state this is:
There exist $x_1, \ldots, x_n\in |X|$ such that
the smallest normal closed subgroup $\Gamma$ of $\pi_1(X)$
containing $1$ frobenius element for each $x_i$ is all of $\pi_1(X)$. i.e.,
$\Gamma = \pi_1(X)$.

\begin{proof}
Pick $N\gg 0$ and let
$$
\{x_1, \ldots, x_n\} =
{\text{ set of all closed points of}
\atop X \text{ of degree} \leq N\text{ over } k}
$$
Let $\Gamma\subset \pi_1(X)$ be as in the variant statement for these
points. Assume $\Gamma \neq \pi_1(X)$. Then we can pick a normal open
subgroup $U$ of $\pi_1(X)$ containing $\Gamma$ with
$U \neq \pi_1(X)$. By R.H. for $X$ our set of points will have some
$x_{i_1}$ of degree $N$, some $x_{i_2}$ of degree $N - 1$. This shows
$\deg : \Gamma \to \widehat{\mathbf{Z}}$ is surjective
and so the same holds for $U$. This exactly
means if $Y \to X$ is the finite \'etale Galois covering
corresponding to $U$, then $Y_{\overline{k}}$ irreducible.
Set $G = \text{Aut}(Y/X)$. Picture
$$
Y \to^G X,\quad G = \pi_1(X)/U
$$
By construction all points of $X$ of degree $\leq N$, split
completely in $Y$. So, in particular
$$
\# Y(k_N)\geq (\# G)\# X(k_N)
$$
Use R.H. on both sides. So you get
$$
q^N+1+2g_Yq^{N/2}\geq \# G\# X(k_N)\geq \#
G(q^N+1-2g_Xq^{N/2})
$$
Since $2g_Y-2 = (\# G)(2g_X-2)$, this means
$$
q^N + 1 + (\# G)(2g_X - 1) + 1)q^{N/2}\geq
\# G (q^N + 1 - 2g_Xq^{N/2})
$$
Thus we see that $G$ has to be the trivial group if $N$ is large enough.
\end{proof}

\noindent
{\bf Weird Question.}
Set $W_X = \deg^{-1}(\mathbf{Z})\subset \pi_1(X)$.
Is it true that for some finite set of closed points $x_1, \ldots, x_n$ of $X$
the set of all frobenii corresponding to these points
{\it algebraically} generate $W_X$?

\medskip\noindent
By a Baire category argument this translates into the same question
for all Frobenii.





\section{How many points are there really?}
\label{section-really}

\noindent
If the genus of the curve is large relative to $q$, then the main
term in the formula $\# X(k) = q - \sum \omega_i + 1$ is not $q$
but the second term $\sum \omega_i$ which can (a priori) have
size about $2g_X\sqrt{q}$. In the paper \cite{Drinfeld-number}
the authors Drinfeld and Vladut show that this maximum is (as predicted
by Ihara earlier) actually at most about $g\sqrt{q}$.

\medskip\noindent
Fix $q$ and let $k$ be a field with $k$ elements. Set
$$
A(q) = \limsup_{g_X \to \infty} \frac{\# X(k)}{g_X}
$$
where $X$ runs over geometrically irreducible smooth projective
curves over $k$. With this definition we have the following results:
\begin{itemize}
\item RH $\Rightarrow A(q)\leq 2\sqrt{q}$
\item Ihara $\Rightarrow A(q)\leq \sqrt{2q}$
\item DV $\Rightarrow A(q)\leq \sqrt{q}-1$ (actually this is sharp if $q$
is a square)
\end{itemize}

\begin{proof}
Given $X$ let $w_1, \ldots, w_{2g}$ and $g = g_X$ be as before. Set
$\alpha_i = \frac{w_i}{\sqrt{q}}$, so $|\alpha_i| = 1$. If $\alpha_i$
occurs then $\overline{\alpha}_i = \alpha_i^{-1}$ also occurs. Then
$$
N = \# X(k) \leq X(k_r) = q^r + 1 - (\sum_i \alpha_i^r) q^{r/2}
$$
Rewriting we see that for every $r \geq 1$
$$
-\sum_i \alpha_i^r \geq Nq^{-r/2} - q^{r/2} - q^{-r/2}
$$
Observe that
$$
0 \leq |\alpha_i^n +\alpha_i^{n-1} +\ldots +\alpha_i +1|^2
= (n + 1) + \sum_{j = 1}^n (n + 1 - j) (\alpha_i^j + \alpha_i^{-j})
$$
So
\begin{align*}
2g(n+1) & \geq - \sum_i \left(\sum_{j = 1}^n (n+1-j)(\alpha_i^j
+\alpha_i^{-j})\right)\\
& =-\sum_{j = 1}^n (n+1-j)\left(\sum_i\alpha_i^j
+\sum_i\alpha_i^{-j}\right)
\end{align*}
Take half of this to get
\begin{align*}
g(n+1)& \geq - \sum_{j = 1}^n (n+1-j)(\sum_i\alpha_i^j)\\
& \geq N\sum_{j = 1}^n (n+1-j)q^{-j/2}-\sum_{j = 1}^n
(n+1-j)(q^{j/2}+q^{-j/2})
\end{align*}
This gives
$$
\frac{N}{g}\leq \left(\sum_{j = 1}^n \frac{n+1-j}{n+1}q^{-j/2} \right)^{-1}
\cdot
\left(
1 + \frac{1}{g} \sum_{j = 1}^n \frac{n + 1 - j}{n + 1}(q^{j/2} + q^{-j/2})
\right)
$$
Fix $n$ let $g\to \infty$
$$
A(q)\leq \left(\sum_{j = 1}^n \frac{n+1-j}{n+1}q^{-j/2}\right)^{-1}
$$
So
$$
A(q)\leq \lim_{n\to\infty}(\ldots) = \left(\sum_{j = 1}^\infty
q^{-j/2}\right)^{-1}=\sqrt{q}-1
$$
\end{proof}





\input{chapters}

\bibliography{my}
\bibliographystyle{amsalpha}

\end{document}
